继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

【CSS】按钮特效 - 2

www说
关注TA
已关注
手记 302
粉丝 83
获赞 493

HTML代码

<a href="#">RABBIT</a>

CSS代码

body {    background: #353535;
}a {    width: 200px;    display: block;    position: relative;    border: 2px solid #D24D57;    margin: 40px auto;    padding: 14px 16px;    font-size: 20px;    color: #fff;    text-align: center;    text-decoration: none;    overflow: hidden;
}a:after {    content: '';    display: block;    position: absolute;    width: 100%;    height: 0%;    left: 50%;    top: 50%;    z-index: -1;    background: #D24D57;    transform: translateX(-50%) translateY(-50%) rotate(25deg);    -webkit-transition: all 0.75s ease 0s;    -moz-transition: all 0.75s ease 0s;    -o-transition: all 0.75s ease 0s;    transition: all 0.75s ease 0s;
}a:hover:after {    height: 300%;
}






HTML代码

<a href="#">RABBIT</a>

CSS代码

body {    background: #353535;
}a {    width: 200px;    display: block;    position: relative;    border: 2px solid #D24D57;    margin: 40px auto;    padding: 14px 16px;    font-size: 20px;    color: #fff;    text-align: center;    text-decoration: none;    overflow: hidden;
}a:after {    content: '';    display: block;    position: absolute;    opacity: 0;    width: 100%;    height: 0%;    left: 50%;    top: 50%;    z-index: -1;    background: #D24D57;    transform: translateX(-50%) translateY(-50%) rotate(0deg);    -webkit-transition: all 0.75s ease 0s;    -moz-transition: all 0.75s ease 0s;    -o-transition: all 0.75s ease 0s;    transition: all 0.75s ease 0s;
}a:hover:after {    height: 300%;    opacity: 1;
}






HTML代码

<a href="#">RABBIT</a>

CSS代码

body {    background: #353535;
}a {    width: 200px;    display: block;    position: relative;    border: 2px solid #D24D57;    margin: 40px auto;    padding: 14px 16px;    font-size: 20px;    color: #fff;    text-align: center;    text-decoration: none;    overflow: hidden;
}a:after {    content: '';    display: block;    position: absolute;    opacity: 0;    width: 100%;    height: 0%;    left: 50%;    top: 50%;    z-index: -1;    background: #D24D57;    transform: translateX(-50%) translateY(-50%) rotate(90deg);    -webkit-transition: all 0.75s ease 0s;    -moz-transition: all 0.75s ease 0s;    -o-transition: all 0.75s ease 0s;    transition: all 0.75s ease 0s;
}a:hover:after {    height: 450%;    opacity: 1;
}



作者:滑滑兔
链接:https://www.jianshu.com/p/42b56e4c373c


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP