我在某些版本的Internet Explorer中遇到以下代码的问题:
#iconautente{ background-image:url('/style/images/spritecommon.png'); /*icona_utente.png*/ background-position:-117px -15px; text-indent:-9000px; width:20px; height:23px; display:inline-block; } <a id="iconautente" href="/admin/index.PHP">admin</a>
在Vista下的Firefox,IE7和IE8中,我看到了背景和没有文字,正如预期的那样.在XP下的IE6和IE8中,整个图像是缩进的,而不是文本,因此不显示图像.
什么应该是正确的行为?有解决方法吗?
解决方法
* html #iconautente{text-indent:0; line-height:0; font-size:0; overflow:hidden}/*ie6 hack */ *:first-child+html #iconautente{ text-indent:0; line-height:0; font-size:0; overflow:hidden}/*ie7 hack */
原文地址:https://www.jb51.cc/css/242136.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。