微信小程序实用工具——渐变色按钮(一)

文章目录

  • 微信小程序实用工具——渐变色按钮(一)
    • 前言
    • 按钮一
    • 按钮二
    • 按钮三
    • 按钮四
    • 按钮五
    • 按钮六
    • 按钮七
    • 按钮八

前言

平时我们在开发中的按钮色调过于单调
于是我在网上找了几款好看的渐变色按钮分享一下
下面是动图的效果展示

按钮一

wxml:

<button class="btn btn-grad1">
</button>

wxss:

.btn-grad1 {background-image: linear-gradient(to right, #314755 0%, #26a0da  51%, #314755  100%);margin: 10px;padding: 15px 45px;text-align: center;text-transform: uppercase;transition: 0.5s;background-size: 200% auto;color: white;            box-shadow: 0 0 20px #eee;border-radius: 10px;display: block;
}.btn-grad1:hover {background-position: right center; /* change the direction of the change here */color: #fff;text-decoration: none;
}

按钮二

wxml:

<button class="btn btn-grad2">
</button>

wxss:

.btn-grad2 {background-image: linear-gradient(to right, #ff6e7f 0%, #bfe9ff  51%, #ff6e7f  100%);margin: 10px;padding: 15px 45px;text-align: center;text-transform: uppercase;transition: 0.5s;background-size: 200% auto;color: white;            box-shadow: 0 0 20px #eee;border-radius: 10px;display: block;
}.btn-grad2:hover {background-position: right center; /* change the direction of the change here */color: #fff;text-decoration: none;
}

按钮三

wxml:

<button class="btn btn-grad3">
</button>

wxss:

.btn-grad3 {background-image: linear-gradient(to right, #003973 0%, #E5E5BE  51%, #003973  100%);margin: 10px;padding: 15px 45px;text-align: center;text-transform: uppercase;transition: 0.5s;background-size: 200% auto;color: white;            box-shadow: 0 0 20px #eee;border-radius: 10px;display: block;
}.btn-grad3:hover {background-position: right center; /* change the direction of the change here */color: #fff;text-decoration: none;
}

按钮四

wxml:

<button class="btn btn-grad4">
</button>

wxss:

.btn-grad4 {background-image: linear-gradient(to right, #02AAB0 0%, #00CDAC  51%, #02AAB0  100%);margin: 10px;padding: 15px 45px;text-align: center;text-transform: uppercase;transition: 0.5s;background-size: 200% auto;color: white;            box-shadow: 0 0 20px #eee;border-radius: 10px;display: block;
}.btn-grad4:hover {background-position: right center; /* change the direction of the change here */color: #fff;text-decoration: none;
}

按钮五

wxml:

<button class="btn btn-grad5">
</button>

wxss:

.btn-grad5 {background-image: linear-gradient(to right, #e52d27 0%, #b31217  51%, #e52d27  100%);margin: 10px;padding: 15px 45px;text-align: center;text-transform: uppercase;transition: 0.5s;background-size: 200% auto;color: white;            box-shadow: 0 0 20px #eee;border-radius: 10px;display: block;
}.btn-grad5:hover {background-position: right center; /* change the direction of the change here */color: #fff;text-decoration: none;
}

按钮六

wxml:

<button class="btn btn-grad6">
</button>

wxss:

.btn-grad6 {background-image: linear-gradient(to right, #DA22FF 0%, #9733EE  51%, #DA22FF  100%);margin: 10px;padding: 15px 45px;text-align: center;text-transform: uppercase;transition: 0.5s;background-size: 200% auto;color: white;            box-shadow: 0 0 20px #eee;border-radius: 10px;display: block;
}.btn-grad6:hover {background-position: right center; /* change the direction of the change here */color: #fff;text-decoration: none;
}

按钮七

wxml:

<button class="btn btn-grad7">
</button>

wxss:

.btn-grad7 {background-image: linear-gradient(to right, #603813 0%, #b29f94  51%, #603813  100%);margin: 10px;padding: 15px 45px;text-align: center;text-transform: uppercase;transition: 0.5s;background-size: 200% auto;color: white;            box-shadow: 0 0 20px #eee;border-radius: 10px;display: block;
}.btn-grad7:hover {background-position: right center; /* change the direction of the change here */color: #fff;text-decoration: none;
}

按钮八

wxml:

<button class="btn btn-grad8">
</button>

wxss:

.btn-grad8 {background-image: linear-gradient(to right, #77A1D3 0%, #79CBCA  51%, #77A1D3  100%);margin: 10px;padding: 15px 45px;text-align: center;text-transform: uppercase;transition: 0.5s;background-size: 200% auto;color: white;            box-shadow: 0 0 20px #eee;border-radius: 10px;display: block;
}.btn-grad8:hover {background-position: right center; /* change the direction of the change here */color: #fff;text-decoration: none;
}

微信小程序实用工具——渐变色按钮(一)相关推荐

  1. 微信小程序实用工具——渐变色按钮(二)

    今日推荐

  2. 微信开发者工具无法选择预览和真机调试_小程序开发 第二篇:使用微信小程序开发者工具、wepy框架初始化项目...

    1.微信小程序开发者工具 使用: 小程序原生开发:直接使用小程序开发者工具打开项目即可 小程序框架开发:首选官方提供类vue.js开发框架 wepy.js ,备选 mpVue.我们选择的是 wepy ...

  3. 微信小程序开发者工具怎么使用Less、Sass

    微信小程序开发者工具怎么使用Less.Sass 前言 一.Sass使用 第一步 按需导入 如何设置Sass 应用 Less使用 前言 在微信小程序开发者工具中编写wxss样式表是不是感觉很麻烦,不要困 ...

  4. 小程序开发工具_有哪些好用的微信小程序开发工具?如何选择?

    小程序对商家和个人的帮助很大,可以为商家导入新的线上流量.那么该如何拥有自己的小程序呢?如果你想自己制作小程序的话,目前有两种方式,一种是使用"微信开发者工具",需要精通代码编程, ...

  5. @所有人,官网下载的微信小程序开发工具安装后黑屏咋办?

    @所有人,官网下载的微信小程序开发工具安装后黑屏咋办? 一直这样,重复安装也是这样 欢迎使用Markdown编辑器 你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页.如果你想学习如何使 ...

  6. 微信小程序: 微信小程序-开发者工具添加less插件

    在入门微信小程序的时候,在其他编译软件中有使用less插件的小伙伴都会发现,在微信小程序-    开发者工具中是没有下载插件这个入口的,所以我们可以借助vscode来辅助微信小程序-开发者工具安装le ...

  7. 微信小程序开发工具安装详解

    从事java后端工作的程序员,为了不让自己技术落伍,或多或少应该要了解一点前端技术,特别是时下比较火爆的微信小程序,它有取代手机原生app的趋势. 本人对微信小程序是零基础认识,下面记录一下微信小程序 ...

  8. 微信小程序如何通过button按钮实现分享(转发)功能

    微信小程序如何通过button按钮实现分享(转发)功能 导读:微信小程序通过button按钮实现分享(转发)功能 有两种方式,一种是页面内按钮分享,一种是菜单转发.下面具体为大家解答.... 微信小程 ...

  9. 微信小程序 #开发者工具 无法 在 资源管理器中 #右键 #新建page 的问题。

    微信小程序 #开发者工具 无法 在 资源管理器中 #右键 #新建page 的问题. 初学者怎么解决呢,建议尝试在设置(setting)_通用设置 _中更改语言,一般有"系统语言". ...

最新文章

  1. fatfs文件系统支持中文长文件名
  2. shader 编程入门(一)
  3. 【Spring注解系列02】@CompentScan与@CompentScans
  4. mysql 5.6压缩安装_MySQL 5.6 for Windows 解压缩版配置安装
  5. 开启Swarm集群以及可视化管理
  6. 关于java_关于Java基础
  7. pandas 画折线图_如何从Pandas数据帧绘制多个折线图
  8. 显示连接失败_技术丨外接显示器障碍的诊断方法
  9. C++之static关键字探究
  10. linux oracle 11g ora-00845,Oracle 11g ORA-00845 在Linux 下的解决方案
  11. 打开我的收藏夹 -- Python篇
  12. JAVA 守护线程 Deamon
  13. 【游戏开发引擎】 实验3:Captain Blaster 2D 滚动射击游戏
  14. 服务架构演变~超详细
  15. 【Python代码】情人节到了,表白代码肯定是少不了的啦
  16. cookie有效时间设置,手把手教你设置
  17. 【看表情包学Linux】插叙:实现简易的 Shell | 通过内建命令实现路径切换 | 再次理解环境变量
  18. 创建群晖共享文件夹,并进行电脑访问
  19. 电路中芯片旁边0.104uF电容的作用
  20. 智能服务机器人产品及解决方案

热门文章

  1. 2022-2028全球临床前医疗设备检测服务行业调研及趋势分析报告
  2. 9月PMP考试报名查看(如何支付PMP考试费用?)
  3. 日语 朝鲜语基本介绍
  4. CNN经典模型:深度残差网络(DRN)ResNet
  5. 全新霸王餐小程序、外卖霸王餐程序代码源码|美团/饿了么霸王餐系统 粉丝裂变分销,独立商家端
  6. Java 学习手记(五)第二部分 继承与接口
  7. c语言集合交并补 位运算实现
  8. git 从分支拉取代码到本地,并修改后提取代码到该分支
  9. 报错已解决:@WebServlet报红,@Param报红
  10. vss2010c语言怎么运行,在Linux下使用gcc运行C语言程序