uniapp——漂亮的按钮,圆角view,渐变色view,圆角边框view,点击效果波动、点击放大效果
生活随笔
收集整理的這篇文章主要介紹了
uniapp——漂亮的按钮,圆角view,渐变色view,圆角边框view,点击效果波动、点击放大效果
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1、漂亮的按鈕
a、圓角按鈕
template
<button class="button-yuanjiao" hover-class="bg-click">圓角按鈕</button>style
.button-yuanjiao {width: 200rpx;height: 50rpx;display: flex;margin-top: 30rpx;line-height: 50rpx;justify-content: center;border-radius: 25px;/* 這里可以改成漸變: background:linear-gradient(to right, #FFDE28,#FF3228) */background-color: #ff5500;font-size: 28rpx;} .bg-click {background-color: #a7a9ff;}b、邊框按鈕
template
style
.button-biankuang{width: 200rpx;height: 50rpx;display: flex;margin-top: 30rpx;line-height: 50rpx;justify-content: center;border-radius: 25px;border: 3rpx solid #6699FF;font-size: 28rpx;} .bg-click {top: 3upx;background-color: #a7a9ff;}2、圓角view,按下變背景色
template
style
.view-yuanjiao {width: 200rpx;height: 50rpx;display: flex;justify-content: center;border-radius: 25px;background-color: #007AFF;} .bg-click{top: 3upx;background-color: #a7a9ff; }3、圓角邊框
template
style
.view-biankuang{width: 200rpx;height: 50rpx;display: flex;margin-top: 30rpx;justify-content: center;border-radius: 25px; border: 3rpx solid #6699FF;}4、漸變色
從左往右的漸變色:
5、點擊 效果波動
效果圖:
代碼:
6、點擊放大效果
<view class="confirm " hover-class="hover1">放大</view> .confirm {width: 325rpx;height: 80rpx;background: #07c160;border-radius: 6rpx;font-size: 30rpx;color: #fff;line-height: 80rpx;text-align: center;} .hover1{transform: scale(1.1) !important;}總結(jié)
以上是生活随笔為你收集整理的uniapp——漂亮的按钮,圆角view,渐变色view,圆角边框view,点击效果波动、点击放大效果的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python numpy 行 列个数_P
- 下一篇: No CUDA runtime is f