CSS
.help {
background: url("/images/info.png") no-repeat scroll center center transparent;
cursor: pointer;
height: 16px;
line-height: 16px;
margin: 0 5px;
padding: 2px 8px;
text-indent: -100px;
}
HTML
1)
<label for="test_1">City Name Sub
<span title="City Name Sub" class="help"> </span>
</label>
2)
<label for="test_2">SMMMC
<span title="SMMC Sub" class="help"> </span>
</label>
第一个标签显示带有文本的正确图像。但是对于第二个标签,从 IE 的顶部获取裁剪图像。 任何想法 ?任何解决方案?
最佳答案
我不知道你的图片是什么样的,但这对你有帮助吗?
CSS(编辑背景和文本缩进属性)
.help {
background: url("/images/info.png") no-repeat scroll right center transparent;
cursor: pointer;
height: 16px;
line-height: 16px;
margin: 0 5px;
padding: 2px 8px;
}
HTML
<label for="test_1" class="help" title="City Name Sub">City Name Sub</label>
关于html - ie 的CSS 问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5579225/