CSS3按钮上的颜色转换
我似乎无法通过CSS3转换使我的按钮改变颜色。我已经成功地在和标记上使用了相同的代码,但是按钮没有这样的运气 代码如下:CSS3按钮上的颜色转换,css,colors,css-transitions,transition,Css,Colors,Css Transitions,Transition,我似乎无法通过CSS3转换使我的按钮改变颜色。我已经成功地在和标记上使用了相同的代码,但是按钮没有这样的运气 代码如下: .button { position:absolute; width: 135px; height: 46px; background-color: #ef6529; text-decoration: none; border-radius: 4px; -moz-border-radius: 4px; borde
.button {
position:absolute;
width: 135px;
height: 46px;
background-color: #ef6529;
text-decoration: none;
border-radius: 4px;
-moz-border-radius: 4px;
border: 1px solid #c33b00;
box-shadow: 0px 4px 0px #af5a5a;
-moz-box-shadow: 0px 4px 0px #af5a5a;
-webkit-box-shadow: 0px 4px 0px #af5a5a;
-webkit-transition:color 1s ease-in;
-moz-transition:color 1s ease-in;
-o-transition:color 1s ease-in;
transition:color 1s ease-in;
}
.button:hover {
width: 135px;
height: 46px;
background-color: #ff6726;
border-radius: 4px;
-moz-border-radius: 4px;
border: 1px solid #c33b00;
text-decoration: none;
}
以及HTML:
<a href="#" class="button">
<!--<h2>PUSH ME!</h2>-->
</a>
干杯 您尚未为按钮指定颜色。我想你是想改变背景色吧。只需改变过渡:颜色1s容易;要转换:背景色1s ease in 你能发布你的html吗?如果你能看到加价那会很有帮助的。对不起,忘了那件事吧!啊,我明白了!这就是它对其他元素起作用的原因,因为我只是在更改颜色属性。指定背景色有效。谢谢