纯CSS3实现超酷扁平风格按钮特效

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 纯CSS3实现超酷扁平风格按钮特效 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图1:

纯CSS3实现超酷扁平风格按钮特效

部分效果截图2:

纯CSS3实现超酷扁平风格按钮特效

HTML代码(index.html):

<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>纯CSS3实现超酷扁平风格按钮特效</title>
<link rel="stylesheet" href="css/buttons.css">
</head>
<body>
<div class="zzsc-content">
	<h2>纯CSS3实现超酷扁平风格按钮特效</h2>
	<button class="button button_3d" data-button="red">BUTTON</button>
	<button class="button button_3d" data-button="green">BUTTON</button>
	<button class="button button_3d" data-button="blue">BUTTON</button>
	<button class="button button_3d" data-button="purple">BUTTON</button>
	<button class="button button_3d button_arrow">BUTTON</button>
	<br/>
	<button class="button button_em" data-button="red">BUTTON</button>
	<button class="button button_em" data-button="green">BUTTON</button>
	<button class="button button_em button_arrow" data-button="blue">BUTTON</button>
	<button class="button button_em" data-button="purple">BUTTON</button>
	<button class="button button_em">BUTTON</button>
	<br/>
	<button class="button button_border" data-button="red">BUTTON</button>
	<button class="button button_border button_arrow" data-button="green">BUTTON</button>
	<button class="button button_border" data-button="blue">BUTTON</button>
	<button class="button button_border" data-button="purple">BUTTON</button>
	<button class="button button_border">BUTTON</button>
	<br/>
	<button class="button button_shadow" data-button="red">BUTTON</button>
	<button class="button button_shadow" data-button="green">BUTTON</button>
	<button class="button button_shadow" data-button="blue">BUTTON</button>
	<button class="button button_shadow button_arrow" data-button="purple">BUTTON</button>
	<button class="button button_shadow">BUTTON</button>
	<br/>
	<button class="button button_normal button_group button_arrow" data-button="red">BUTTON</button>
	<button class="button button_normal button_group" data-button="green">BUTTON</button>
	<button class="button button_normal button_group button_disabled" data-button="blue">BUTTON</button>
	<button class="button button_normal button_group" data-button="purple">BUTTON</button>
	<button class="button button_normal button_group">BUTTON</button>
</div>
</body>
</html>

CSS代码(buttons.css):

@charset "UTF-8";@import "https://fonts.useso.com/css?family=Open+Sans";body{background:#494A5F;color:#D5D6E2;font-weight:500;font-size:1.05em;font-family:"Microsoft YaHei","宋体","Segoe UI","Lucida Grande",Helvetica,Arial,sans-serif,FreeSans,Arimo;}
a{color:#2fa0ec;text-decoration:none;outline:none;}
a:hover,a:focus{color:#74777b;}
.zzsc-content{width:800px;margin:50px auto;}
.button{margin:8px;font-family:'Open Sans',sans-serif;cursor:pointer;transition:all 0.3s;}
.button:focus{outline:0;}
.button_3d{padding:1em 1.3em .9em;border:0;box-shadow:inset 0 -7px 0 rgba(0,0,0,0.15);font-size:1.2em;border-radius:6px;color:#e6e6e6;background:#b4b4b4;transition:all 0.1s;}
.button_3d:hover{box-shadow:inset 0 -5px 0 rgba(0,0,0,0.15);}
.button_em{padding:.9em 1.3em .8em;border:0;font-size:1.2em;border-radius:5px;color:#e6e6e6;background:#b4b4b4;box-shadow:inset 0 0 0 4.5px rgba(255,255,255,0.65);}
.button_em:hover{box-shadow:inset 0 0 0 4.5px rgba(255,255,255,0.25);}
.button_border{padding:.85em 1.3em .65em;font-size:1.2em;background:none;border-width:2.7px;border-style:solid;border-color:#a0a0a0;border-radius:4px;color:#787878;}
.button_shadow{padding:.85em 1.3em .65em;font-size:1.2em;background:#fafafa;border:0;box-shadow:0 0 20px silver;color:#787878;}
.button_normal{padding:.85em 1.3em .65em;font-size:1.2em;background:silver;border:0;color:white;}
.button_normal:hover{background:#a7a7a7;}
.button_normal[data-button=red]:hover{background:#eb2521;}
.button_normal[data-button=blue]:hover{background:#20638f;}
.button_normal[data-button=green]:hover{background:#25a25a;}
.button_normal[data-button=purple]:hover{background:#9e3851;}
.button_3d[data-button=red],.button_em[data-button=red],.button_normal[data-button=red]{background:#EF5350;}
.button_3d[data-button=green],.button_em[data-button=green],.button_normal[data-button=green]{background:#2ecc71;}
.button_3d[data-button=blue],.button_em[data-button=blue],.button_normal[data-button=blue]{background:#2980b9;}
.button_3d[data-button=purple],.button_em[data-button=purple],.button_normal[data-button=purple]{background:#BF4A67;}
.button_shadow:hover,.button_border:hover{color:#fff !important;background:#a0a0a0;}
.button_shadow[data-button=red],.button_border[data-button=red]{border-color:#EF5350;color:#EF5350;}
.button_shadow[data-button=blue],.button_border[data-button=blue]{border-color:#2980b9;color:#2980b9;}
.button_shadow[data-button=green],.button_border[data-button=green]{border-color:#2ecc71;color:#2ecc71;}
.button_shadow[data-button=purple],.button_border[data-button=purple]{border-color:#BF4A67;color:#BF4A67;}
.button_shadow[data-button=red]:hover,.button_border[data-button=red]:hover{background:#EF5350;}
.button_shadow[data-button=blue]:hover,.button_border[data-button=blue]:hover{background:#2980b9;}
.button_shadow[data-button=green]:hover,.button_border[data-button=green]:hover{background:#2ecc71;}
.button_shadow[data-button=purple]:hover,.button_border[data-button=purple]:hover{background:#BF4A67;}
.button_arrow:hover:after{content:" 》";position:absolute;margin-left:4px;opacity:.6;}
.button_arrow:hover{padding-left:1em;padding-right:1.6em;}
.button_disabled{opacity:0.5;cursor:not-allowed;}
.button_group{margin:16px -2px 0;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
2.04 KB
Html CSS3特效
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章