Questions tagged «background-size»

10
IE9-10中压缩了SVG的背景大小
我有一个div设置了背景图片: <div>Play Video</div> 使用以下CSS: div { background-image: url('icon.png'); background-image: url('icon.svg'), none; background-size: 40px 40px; background-repeat: no-repeat; background-position: 90% 50%; padding: 20px; width: 150px; } 在Firefox,Safari和Chrome浏览器中会尊重背景尺寸。在IE8中,SVG替换为PNG文件。但是,在IE9和IE10中,SVG文件的大小已大大缩小。问题似乎与div的宽度和高度有关。如果我添加150px的高度,则SVG会正确呈现。如果将其缩小(即100px),图形将开始缩小。 是否有人在资源管理器中找到解决此问题的方法?有没有办法告诉IE独立于div的宽度和高度使用背景大小值?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.