【发布时间】:2012-10-20 01:44:57
【问题描述】:
我想用type="submit" 制作一个登录按钮,其中的图像也有悬停图像和 :active 图像,
它在 firefox 和 chrome 上运行良好,但在 internet explorer 上它只提供基本图像,而不提供悬停图像和活动图像。
除此之外,当你点击它时,它会在按钮上画一条虚线。
它在 IE 上的表现如何:
http://imageshack.us/photo/my-images/72/ieproblem.jpg/
它在 chrome 和 firefox 上的显示方式:
http://imageshack.us/photo/my-images/685/chromes.jpg/
.button
{
border:none;
background: url(../img/login.jpg);
width:41px;height:19px;
}
.button:hover
{
background: url(../img/loginhover.jpg) no-repeat top left;
width: 41px;
height: 19px;
}
.button:active {
background: url(../img/loginactive.jpg);
}
HTML 上的按钮代码:
<input type="submit" class="button" value=""/>
【问题讨论】:
-
请发布您正在使用的 CSS 代码,如果您愿意,我很乐意为您提供帮助。
-
“虚线”可能是一个非常重要的辅助功能。如果可能的话,你不应该担心这个。
-
我用 css 代码更新了帖子。谢谢!
标签: html css internet-explorer firefox browser