web299.com
全部
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
首页
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
当前位置:
首页
>
网页特效
>
按钮特效
纯CSS3创意按钮设计效果
分类:
按钮特效
日期:
2024-05-14
点击(0)
评论(0)
演 示
免费下载
简介
该CSS3按钮依赖于Bootstrap和font-awesome字体图标。 ```html
``` ##### HTML结构 这组按钮使用Bootstrap预定义的尺寸作为按钮的尺寸,分为btn-lg、btn-sm和btn-xs3种。颜色分为red、green、blue和orange4种。例如一个红色大按钮的HTML代码如下: ```html
button
``` ##### CSS样式 为按钮添加如下的CSS样式: ```html .btn{ border: none; border-radius: 0; text-transform: uppercase; padding-top: 0; padding-bottom: 0; position: relative; transition: all 0.3s ease 0s; } .btn:before{ content: ""; display: block; width: 100%; position: absolute; top: 0; left: 0; border-top: 2px solid transparent; transition: all 0.3s ease 0s; } .btn:hover:before{ transform: translateY(42px); } .btn:after{ content: "\f105"; font-family:fontawesome; display: inline-block; width: 44px; height: 44px; border: 2px solid transparent; font-size: 24px; line-height: 40px; position: relative; top: 0; right: -16px; transition: all 0.43s ease 0s; } .btn:hover:after{ transform: rotateX(180deg); } .btn.btn-sm:hover:before{ transform: translateY(32px); } .btn.btn-sm:after{ width: 34px; height: 34px; line-height: 30px; font-size: 20px; right: -10px; } .btn.btn-xs:hover:before{ transform: translateY(22px); } .btn.btn-xs:after{ width: 24px; height: 24px; line-height: 20px; font-size: 16px; right: -5px; } .btn.red{ color: #ff6e6e; } .btn.red:before, .btn.red:after{ border-color: #ff6e6e; } .btn.blue{ color: #5cbcf7; } .btn.blue:before, .btn.blue:after{ border-color: #5cbcf7; } .btn.orange{ color: #ef965b; } .btn.orange:before, .btn.orange:after{ border-color: #ef965b; } .btn.green{ color: #7ad79a; } .btn.green:before, .btn.green:after{ border-color: #7ad79a; } @media only screen and (max-width: 767px){ .btn{ margin-bottom: 20px; } } ```
相关推荐
html5浪漫粒子表白文字特效
SlidesJS幻灯片特效
html5瀑布流相册特效
css3 svg实现的情人节表白鲜花动画特效
t-scroll.js基于ES6的DOM元素,过渡动画库插件
纯js写省市区三级联动效果
广告
广告