设置透明色
老师,在课程中提到的透明色是指用filter弄的吗?还是opacity?
老师,在课程中提到的透明色是指用filter弄的吗?还是opacity?
2016-05-16
试下,大概效果出来了。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
div{position: relative; width:98px; height: 98px; margin: 50px auto; border: 1px solid #A481EC; border-radius: 20px 20px 0 0; background-color: #A481EC;}
div:before,div:after{content: ""; display: block; position: absolute; bottom: -1px; width:30px; height: 30px;}
div:before{left: -30px; background: -webkit-radial-gradient(top left, circle, transparent 70%, #A481EC 30%);}
div:after{right: -30px; background: -webkit-radial-gradient(top right, circle, transparent 70%, #A481EC 30%);}
</style>
</head>
<body>
<div></div>
</body>
</html>举报