[英]background-image and repeat-x causes image deformation on Mac OS, Firefox 14.0.1
I trying to set background image (pattern) to div and I have a deformation of pattern, that changes while I resize the browser. 我试图将背景图像(图案)设置为div,但图案发生变形,在调整浏览器大小时会发生变化。
When I remove repeat-x and set width of the div to pattern width (8px) the image looks ok - img.skitch.com/20120830-m69s2a7x4d3fdxjmsjjs8f58f6.jpg (sorry, can't post more than 2 hyperlinks). 当我删除repeat-x并将div的宽度设置为图案宽度(8px)时,图像看起来正常-img.skitch.com/20120830-m69s2a7x4d3fdxjmsjjs8f58f6.jpg(抱歉,不能发布两个以上的超链接)。 I also tested this code on Windows 7 in IE9, Chrome 21, Firefox 13 and Opera 12.01 and div with repeat-x looks ok.
我还在IE9,Chrome 21,Firefox 13和Opera 12.01和div带有repeat-x的div上的Windows 7上测试了此代码。
So my questions are: 所以我的问题是:
Thanks a lot. 非常感谢。 Regards.
问候。
It's totally OK. 完全可以 If you remove the
background-repeat: repeat-x;
如果删除
background-repeat: repeat-x;
then it repeat on both the X and Y axes. 然后在X和Y轴上重复。 Because you gave it a height it can't show you repeat Y. Just remove the
repeat-x;
因为你给它的高度就不能显示你重复Y.只需删除
repeat-x;
and give it a larger width. 并给它更大的宽度。 It will repeat on both axes.
它会在两个轴上重复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.