【发布时间】:2011-08-02 21:21:49
【问题描述】:
我想创建一个带有圆角效果的链接。 但是,圆角效果只会在悬停时显示。 通过使用 CSS3,它在 mozilla、chrome 和 Safari 上运行良好,但在 IE 中却不行。
这是我的CSS
a {
color: black; background-color:#ddd;
text-align: center;font-weight: bold;
width:110px; height:25px;
padding: 10px; text-decoration:none;
}
.abc:hover {
background-color: lightblue;
-moz-border-radius: 15px; -webkit-border-radius: 15px; border-radius: 15px;
}
这里是我的html
<a href="#" class="abc">Button</a>
【问题讨论】:
-
除此之外,我还尝试在我的 css 中插入外部文件,例如 (ie-css3.htc)。它适用于 div 元素,但不适用于悬停元素。这是我的代码 .abc:hover { background-color: lightblue; -moz-边界半径:15px; -webkit-border-radius:15px;边框半径:15px;行为:url(ie-css3.htc); /*对于 IE*/ }
标签: javascript html css rounded-corners