七片枫叶 | 4841℃ | 2018-02-22
CSS3应用非常广泛,做出来的效果也非常好看,网上搜集了两款好看的CSS3按钮。
第一款CSS3按钮:
CSS3代码如下:
.a_demo_two { background-color:#3bb3e0; padding:10px; position:relative; font-family: 'Open Sans', sans-serif; font-size:12px; text-decoration:none; color:#fff; background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(44,160,202)), color-stop(1, rgb(62,184,229)) ); -webkit-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 6px 0px #156785; -moz-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 6px 0px #156785; -o-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 6px 0px #156785; box-shadow: inset 0px 1px 0px #7fd2f1, 0px 6px 0px #156785; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; } .a_demo_two::before { background-color:#072239; content:""; display:block; position:absolute; width:100%; height:100%; padding-left:2px; padding-right:2px; padding-bottom:4px; left:-2px; top:5px; z-index:-1; -webkit-border-radius: 6px; -moz-border-radius: 6px; -o-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0px 1px 0px #fff; -moz-box-shadow: 0px 1px 0px #fff; -o-box-shadow: 0px 1px 0px #fff; box-shadow: 0px 1px 0px #fff; } .a_demo_two:active { color:#156785; text-shadow: 0px 1px 1px rgba(255,255,255,0.3); background:rgb(44,160,202); -webkit-box-shadow: inset 0px 1px 0px #7fd2f1, inset 0px -1px 0px #156785; -moz-box-shadow: inset 0px 1px 0px #7fd2f1, inset 0px -1px 0px #156785; -o-box-shadow: inset 0px 1px 0px #7fd2f1, inset 0px -1px 0px #156785; box-shadow: inset 0px 1px 0px #7fd2f1, inset 0px -1px 0px #156785; top:7px; } .a_demo_two:active::before { top:-2px; }
HTML代码如下:
<section> <p> <a href="#" class="a_demo_two"> WWW.ELFGOD.COM </a> </p> <p> <a href="#" class="a_demo_two"> WWW.ELFGOD.COM 精灵 </a> </p> <p> <a href="#" class="a_demo_two"> 欢迎访问 WWW.ELFGOD.COM </a> </p> </section>
第二款CSS3按钮:
CSS3代码如下:
.a_demo_one { background-color:#3bb3e0; padding:10px; position:relative; font-family: 'Open Sans', sans-serif; font-size:12px; text-decoration:none; color:#fff; border: solid 1px #186f8f; background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%); background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(44,160,202)), color-stop(1, rgb(62,184,229)) ); -webkit-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 1px 0px #fff; -moz-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 1px 0px #fff; box-shadow: inset 0px 1px 0px #7fd2f1, 0px 1px 0px #fff; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; } .a_demo_one::before { background-color:#ccd0d5; content:""; display:block; position:absolute; width:100%; height:100%; padding:8px; left:-8px; top:-8px; z-index:-1; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: inset 0px 1px 1px #909193, 0px 1px 0px #fff; -moz-box-shadow: inset 0px 1px 1px #909193, 0px 1px 0px #fff; -o-box-shadow: inset 0px 1px 1px #909193, 0px 1px 0px #fff; box-shadow: inset 0px 1px 1px #909193, 0px 1px 0px #fff; } .a_demo_one:active { padding-bottom:9px; padding-left:10px; padding-right:10px; padding-top:11px; top:1px; background-image: linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%); background-image: -o-linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%); background-image: -moz-linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%); background-image: -webkit-linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%); background-image: -ms-linear-gradient(bottom, rgb(62,184,229) 0%, rgb(44,160,202) 100%); background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(62,184,229)), color-stop(1, rgb(44,160,202)) ); }
HTML代码如下:
<section> <p> <a href="#" class="a_demo_one"> WWW.ELFGOD.COM </a> </p> <p> <a href="#" class="a_demo_one"> WWW.ELFGOD.COM 精灵 </a> </p> <p> <a href="#" class="a_demo_one"> 欢迎访问 WWW.ELFGOD.COM </a> </p> </section>
当然,你可以根据自己喜好,进行修改。
发现好多CMS、博客系统都有这个问题,搞怪了。。导航显示二级栏目:{pc:conte...
6048
验证码很烦,,所以就想取消掉。方法如下:取消后台登陆验证码:打开\phpcms\mo...
5857
浏览文章时用小键盘“← →”翻页,不想写废话了,具体方法如下:新建个JS代码如下:(...
4920
首页调用最新文章:{pc:get sql="SELECT&nbs...
5249
phpcms v9 utf-8版,在使用论坛中的点击图片翻页时出现错误。通过反复试验...
5038
现WINDOWS系统越来越没有节操了,为了赚钱会偷偷搞点小动作,WIN10每次更新后,开机会自动打开浏览器,访问MSN网站,对很多人来说,这是一个不礼貌的行为。那么我们怎么关闭WIN10系统中这个不礼貌的行为呢?解决方法如下:1、快捷键:W...
11596
(一)MSDN (Microsoft Developer Network)版 MSDN软件是微软公司面向软件开发者的一种版本。MSDN 涵盖了所有可以被开发扩充的平台和应用程序,如微软公司的百科全书 Encarta,或者是各种游戏,是不...
9191
浏览器支持 Internet Explorer、Firefox、Opera、Google Chrome、Safari,所有主流浏览器都支持 <blockquote> 标签。 标签定...
8665