为什么使用此 CSS 在 IE8 上看不到此图像按钮?

发布于 2024-10-04 21:49:28 字数 453 浏览 0 评论 0原文

所以,这是按钮的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

雅心素梦 2024-10-11 21:49:28

@domingo为什么text-indent - 1000em,即对负边距进行不同的计算,尝试删除它并检查一次

@domingo why text-indent - 1000em , ie does a different calculation on negative margins , try to remove that and check once

绝影如岚 2024-10-11 21:49:28

font-size: 0; 有时有效。我确信有些网站可以在 IE 中使用负缩进。

font-size: 0; works sometimes. I'm sure there are sites that use negative indent that work in IE.

月亮坠入山谷 2024-10-11 21:49:28

尝试: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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文