最近在做移动端的H5开发,但是要弄按钮,按下去变色的效果

/**提交按钮**/
.dv_bt_buttoncommit{
margin-top: 10px;
width: 80%;
height: 40px;
color: white;
background: #CB0165; //默认的颜色
border-radius: 5px;
}
.dv_bt_buttoncommit:active{
margin-top: 10px;
width: 80%;
height: 40px;
color: white;
border-radius: 5px;
background: #000000; 黑色
opacity: 0.5; //这里重要,就是通过这个透明度来设置
}
网友评论