如何練就優(yōu)秀的項(xiàng)目體驗(yàn)
創(chuàng)意、流程、執(zhí)行缺一不可
CREATIVITY, PROCESS, PERFORM INDISPENSABLE
3種CSS3按鈕特效-原創(chuàng)
2016-09-20

這是本人自己寫(xiě)的比較常見(jiàn)的3種按鈕特效

*html

<div class="box">
<a class="buttom">按鈕1</a>
<br /><br />
<a class="buttom_2">按鈕2</a>
<br /><br />
<a class="buttom_3">按鈕2</a>
</div>

*css

.box{width:100px;margin:0 auto ;text-align: center;}
.buttom{position: relative;display: inline-block;}
.buttom:after{top:100%;left: 50%;right: 50%;border-bottom: 2px solid red;transition: 1s;content: "";position:absolute;}
.buttom:hover:after{left: 0;right: 0;}

.buttom_2{position: relative;display: inline-block;}
.buttom_2:after{top:100%;left: 0;right: 100%;border-bottom: 2px solid red;transition: 1s;content: "";position:absolute;}
.buttom_2:hover:after{right: 0;}

.buttom_3{position: relative;display: inline-block;transition:1s ;}
.buttom_3:before{content: "";position:absolute;background-color:red;left: 0;right:100%;transition:1s ;height: 18px;z-index: -1;}
.buttom_3:hover{color: #fff;}
.buttom_3:hover:before{right: 0;}



CONTACT US
  • 服務(wù)熱線:18664767192
  • 廣州技術(shù)總部:廣州市天河區(qū)天河北路179號(hào)尚層國(guó)際21層
  • 郵箱:admin@bangju.com
掃一掃加客服微信