码迷,mamicode.com
首页 > 其他好文 > 详细

渐变按钮、渐变边框

时间:2017-11-06 14:59:25      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:学习   rtc   clip   enter   orm   gid   width   transform   -o   

 
<!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>  

 WEB前端学习交流群21 598399936

渐变按钮、渐变边框

标签:学习   rtc   clip   enter   orm   gid   width   transform   -o   

原文地址:http://www.cnblogs.com/luludehuhuan/p/7792837.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!