这次才知道的写法,果然条条大路通罗马。
html:
开始
css实现:
.btn-identify{
position: relative;
cursor: pointer;
outline: none;
margin-top: 22px;
width: 450px;
height: 70px;
background: linear-gradient(0deg, #B3B3B3, #CCCCCC);
box-shadow: 0px 4px 0px 0px #999999;
font-size: 26px;
font-weight: 400;
color: #FFFFFF;
}
.btn-identify:active::before {
display: block;
content: ‘’;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 5%)
}
记录button按钮点击效果-用:active::before实现
最新推荐文章于 2024-03-13 18:49:29 发布