输入背景图片时出现问题,在IE8中打开时似乎变得过大(这在IE10或Chrome中不会发生)。
这是输入的代码:
<input class="search rounded" id="searchText" style="background: url(/cat/Images/search-icon-th.png) no-repeat 4% 50%; backgroundsize: 16px;" placeholder="Search" jQuery19107063960315369351="31"/>
图片显示Chrome和IE8之间的区别
铬 http://img41.imageshack.us/img41/9963/q3cb.png
IE8 http://img268.imageshack.us/img268/5109/0z49.png
所以,我的问题是如何在IE8中修复此行为?
提前致谢!
答案 0 :(得分:0)
请修改您的代码。
我会添加这样的东西:
HTML:
<img id="fix" src="ImageLink" />
CSS:
#fix {
width: 100%;
height: 100;
}
这应该使您的图像与用户网页的大小相同。