微信小程序 漂亮的按钮 多颜色+动态效果,好看的button
2022/3/27 11:52:43
本文主要是介绍微信小程序 漂亮的按钮 多颜色+动态效果,好看的button,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
今天推荐一款好看的微信小程序按钮效果,可定制多种颜色, 有动画效果。
显示效果如下:
动态效果预览:
红色按钮代码如下:
/** button **/
.button1 {
position: relative;
display: inline-block;
min-width: 140rpx;
padding: 10px 40rpx;
margin: 0px 40rpx;
z-index: 2;
background-color: #990000;
background-image: -webkit-gradient(linear,
left top,
left bottom,
color-stop(0, rgb(242, 112, 112)),
color-stop(0.49, rgb(238, 84, 84)),
color-stop(0.5, rgb(240, 54, 54)),
color-stop(1, rgb(219, 26, 26)));
color: #fff;
font-weight: bold;
font-size: 20px;
text-decoration: none;
text-align: center;
line-height: 1;
border: 1px solid;
border-color: #a32f2f #822626 #661e1e #822626;
border-radius: 80px;
animation: btna 2s infinite;
transform: scale(0.95);
box-shadow: inset 0px -4px 5px rgba(255, 255, 255, 0.2),
inset 0px 1px 5px rgba(255, 255, 255, 0.2),
0px 2px 0px #661e1e,
0px 4px 0px #661e1e,
0px 6px 0px #661e1e,
0px 8px 5px rgba(0, 0, 0, 0.5);
}
.b1hover {
top: 4px;
box-shadow: inset 0px 4px 5px rgba(255, 255, 255, 0.4),
inset 0px -1px 5px rgba(255, 255, 255, 0.2),
0px 2px 0px #661e1e,
0px 4px 5px rgba(0, 0, 0, 0.5);
}
@keyframes btna {
0% {
transform: scale(0.95)
}
50% {
transform: scale(1.1)
}
100% {
transform: scale(0.95)
}
}
.button1:nth-child(2) {
animation-delay: 1s;
}
这篇关于微信小程序 漂亮的按钮 多颜色+动态效果,好看的button的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-03-30微信小程序的网络设置,及网络请求:wx.request(OBJECT)
- 2024-01-22基于taro搭建小程序多项目框架
- 2024-01-13小程序开发:在插件市场寻找步骤条组件并二开
- 2024-01-05钉钉小程序生态—企业机器人加互动卡片,改善用户体验的开始!
- 2023-12-29【UniApp】-uni-app-打包成小程序
- 2023-12-26性能翻倍!京东亿级体量小程序优化实践
- 2023-12-25小程序优化:第三方SDK过大解决方案
- 2023-11-26微信小程序文件预览和下载-文件系统
- 2023-11-2652天学习微信小程序计划No.2:注册小程序账号&安装开发者工具
- 2023-11-1952天学习微信小程序计划No.1:小程序简介