uniapp点击按钮效果

文章描述:

uniapp点击按钮改变按钮效果

template

<view class="button"  hover-class="checkActive">button</view>

style

.button{
	font-size: 0.28rem;
    color: #fff;
    width: 2.7rem;
    height: 0.88rem;
    line-height: 0.88rem;
    background: #a8bc6d;
    text-align: center;
    border-radius: 1rem;
    margin-left: 0.13rem;
	transition: background 0.3s ease;
}
.checkActive{
	background: #91ab45;
	box-shadow: 0upx 0upx 0upx #91ab45;
	transition: background,box-shadow 0.3s ease;
}

发布时间:2023/02/15

发表评论