效果如圖
測試的時候可以單獨建立個div測試
<div class="key-cell">點擊</div>
下面是樣式
.key-cell{
height:20px;
width:20px;
border-radius: 5px;
}
.key-cell:active{
color: white; //點擊顏色變爲白色
border-radius: 5px;
background: #61CBD6; //黑色
opacity: 0.5; //這裏重要,就是通過這個透明度來設置
}