为什么使用此 CSS 在 IE8 上看不到此图像按钮?
所以,这是按钮的 html 代码
<input type="submit" name="logueo" value="log" id="sendbu"/>
这是 css 样式
#sendbu { width: 50px; height: 34px; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 12px; background: transparent url(lock.png) no-repeat center top; border: 0; text-indent: -1000em; cursor: pointer; cursor: hand; }
所有这些都适用于 Chrome 和 Firefox,但在 IE 中按钮接缝不存在。感谢您的帮助。
So, this is the html code for the button
<input type="submit" name="logueo" value="log" id="sendbu"/>
And this is the css style
#sendbu { width: 50px; height: 34px; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 12px; background: transparent url(lock.png) no-repeat center top; border: 0; text-indent: -1000em; cursor: pointer; cursor: hand; }
All this works on Chrome and Firefox, but in IE the button seams to dont exist. Thanks for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
@domingo为什么text-indent - 1000em,即对负边距进行不同的计算,尝试删除它并检查一次
@domingo why text-indent - 1000em , ie does a different calculation on negative margins , try to remove that and check once
font-size: 0;
有时有效。我确信有些网站可以在 IE 中使用负缩进。font-size: 0;
works sometimes. I'm sure there are sites that use negative indent that work in IE.尝试:
background:transparent url(lock.png) center top no-repeat;
,以及'name
'和'id
'属性应该匹配,不同风格的浏览器使用“名称”的方式不同。Try:
background: transparent url(lock.png) center top no-repeat;
, and also the 'name
' and 'id
' properties should match, different flavours of Browser use 'name' differently.