码迷,mamicode.com
首页 > Web开发 > 详细

css3 如何实现圆边框的渐变

时间:2015-07-20 12:42:53      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:

css3 如何实现圆边框的渐变? 如图

技术分享

<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <style> div { width:100px; height:100px; -webkit-transform:rotate(90deg);} div:before {content:""; display:block; width:100px;height:50px; margin-top:10px; padding:10px; padding-bottom:0; box-sizing:border-box; border-top-left-radius:50px; border-top-right-radius:50px; background:-webkit-gradient( linear, left top, right top, color-stop(0,#fff), color-stop(1,#fff) ),-webkit-gradient( linear, left top, right top, color-stop(0,#077df8), color-stop(1,#74baff) ); background-clip:content-box,padding-box; } div:after {content:""; display:block; width:100px;height:50px; padding:10px; padding-top:0; box-sizing:border-box; border-bottom-left-radius:50px; border-bottom-right-radius:50px; background:-webkit-gradient( linear, left top, right top, color-stop(0,#fff), color-stop(1,#fff) ),-webkit-gradient( linear, left top, right top, color-stop(0,#fff), color-stop(1,#74baff) ); background-clip:content-box,padding-box; } </style> </head> <body> <div></div> </body> </html>

css3 如何实现圆边框的渐变

标签:

原文地址:http://www.cnblogs.com/cgf19920817/p/4661005.html

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