<!DOCMENT HTML>
<html>
<head>
<meta charset="utf-8" />
<style>
.gradient-block-diagonal {
width:200px;
height:40px;
margin:50px;
box-sizing:border-box;
border:1px solid transparent;
background-clip:padding-box,border-box;
background-origin:padding-box,border-box;
background-image: -webkit-linear-gradient(90deg,#fff,#fff), -webkit-linear-gradient(90deg,#33a7d2,#004fa2);
background-image:-moz-linear-gradient(90deg,#fff,#fff),-moz-linear-gradient(90deg,#33a7d2,#004fa2);
background-image:linear-gradient(90deg,#fff,#fff),linear-gradient(90deg,#33a7d2,#004fa2);
}
/*!btn*/
.btn{
display: block;
width: 200px;
height: 40px;
line-height: 40px;
text-align: center;
color: #fff;
text-decoration: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
margin-left: 50px;
}
.btn_gradient{
display: block;
background:-webkit-linear-gradient(left, #d45555,#5693b7, #1da1af) ;
background:-moz-linear-gradient(left,#d45555,#5693b7, #1da1af) ;/*Mozilla*/
background:-o-linear-gradient(left,#d45555,#5693b7, #1da1af) ; /*Opera11*/
background: linear-gradient(to right,#d45555,#5693b7, #1da1af);
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#d45555, endColorstr=#1da1af);/*IE<9>*/
border: none;
-webkit-transition: all .2s;
-moz-transition: all .2s;
-ms-transition: all .2s;
-o-transition: all .2s;
transition: all .2s;;
}
.btn_gradient:hover{
opacity: .8;
}
</style>
</head>
<body>
<div class="gradient-block-diagonal"></div>
<a href="##" class="btn btn_gradient">渐变按钮</a>
</body>
</html>
渐变按钮、渐变边框
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- background-clip: border-box|padding-box|content-box; | bo...
- 使用CSS实现背景色渐变、边框渐变,字体渐变的效果。 背景色渐变 效果如图: linear-gradient: (...
- android studio 下把按钮做成圆角并且按钮添加边框线,在这做一下笔记(这是在xml下作的) 首先在dr...