我目前有一个搜索的“按钮”, 我坐在一个文本框的边上, 如下图所示, 这使铬和火狐变得不错。
""https://i.sstatic.net/coKIx.png" alt="此处输入图像描述"/ >
在IE9中,它变成这样。
“https://i.sstatic.net/o4mSv.png' alt=“IE Render”/> https://i.sstatic.net/o4mSv.png' alt=“IE Render”/>
有人遇到过类似的问题吗?
搜索按钮的 CSS 是 :
.txtSearchBtn
{
display: inline-block;
width: 16px;
height: 16px;
position: relative;
left: -20px;
top: 5px;
cursor: hand;
cursor: pointer;
background-image: url(../Images/magnifier.png);
}
错误似乎与我的页面被放在花哨箱内有关。 IE9 处理内设区块的方式与花哨箱外不同。
EDIT 2: 找出了问题。 我的最大宽设置没有足够的空间用于文本框和图像, 尽管我正在将图像 - 20px 移动到左边, 所以IE将它放在上面的线上 。