background-color:rgba(220,38,38,0.2)
background:red
opacity:0.2
背景设置透明度
css鼠标悬停伪类 :hover 使用方式如下<div class="test">则是测试div</div>
.test: hover {
color: orange
font-weight: bold
}
当鼠标悬停在 div test 上时,test里面的文字会加粗,颜色变为橘色。
鼠标悬停伪类在手机端是看不到效果的,因为手机端是触屏的