<view class="uni-flex uni-row" style="text-align: center;line-height: 30px;" >
<view class="itembtn" tabindex="1"> 选中变色1 </view>
<view class="itembtn" tabindex="2"> 选中变色2 </view>
<view class="itembtn" tabindex="3"> 选中变色3 </view>
</view>
// 指向变色
.itembtn:hover{
background-color: #d3d3d3;
}
/*
选中变色,必须使用 tabindex="1"
*/
.itembtn:active{
background-color: #007aff;
color: #fff;
}
.itembtn:focus{
background-color: #007aff;
color: #fff;
}
uniapp css 横向3个按钮 选中变色
最新推荐文章于 2024-06-21 09:46:03 发布