好看的html 按钮背景,很漂亮的一款CSS3渐变色背景按钮

CSS

语言:

CSSSCSS

确定

@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900");

body {

display: -webkit-box;

display: -ms-flexbox;

display: flex;

-webkit-box-align: center;

-ms-flex-align: center;

align-items: center;

-webkit-box-pack: center;

-ms-flex-pack: center;

justify-content: center;

min-height: 100vh;

font-family: 'Source Sans Pro', sans-serif;

}

.btn-animate {

color: #fff;

font-size: 14px;

font-weight: 600;

letter-spacing: 2px;

cursor: pointer;

position: relative;

z-index: 1;

padding: 15px 30px;

border: none;

border-radius: 4px;

box-shadow: 0px 16px 47px -15px #590b9b;

background: none;

-webkit-transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);

transition: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);

border-radius: 8px;

overflow: hidden;

outline: none;

-webkit-transform: translateZ(0);

transform: translateZ(0);

}

.btn-animate span {

position: relative;

z-index: 2;

}

.btn-animate:before,

.btn-animate:after {

border-radius: 8px;

content: '';

z-index: -1;

background: -webkit-linear-gradient(350deg, #560a9b, #9e158f);

background: linear-gradient(100deg, #560a9b, #9e158f);

content: '';

position: absolute;

top: 0;

left: 0;

width: 100%;

height: 100%;

}

.btn-animate:after {

background: -webkit-linear-gradient(350deg, #003f77, #05c4b5);

background: linear-gradient(100deg, #003f77, #05c4b5);

-webkit-transform: scaleY(0);

transform: scaleY(0);

-webkit-transform-origin: top;

transform-origin: top;

-webkit-transition: -webkit-transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);

transition: -webkit-transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);

transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);

transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), -webkit-transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);

-webkit-transition-delay: .1s;

transition-delay: .1s;

}

.btn-animate:hover {

box-shadow: 0px 16px 47px -15px #003f77;

}

.btn-animate:hover:after {

-webkit-transform: scaleY(1);

transform: scaleY(1);

-webkit-transform-origin: bottom;

transform-origin: bottom;

-webkit-transition-delay: 0s;

transition-delay: 0s;

}

.btn-animate:active {

-webkit-transform: translateY(4px) translateZ(0);

transform: translateY(4px) translateZ(0);

box-shadow: 0px 8px 10px -6px #003f77;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值