clip:<shape> | auto | inherit;
clip:rect (top, right, bottom, left)
.clip{
position:absolute;
clip:rect(30px,200px,150px,50px);
}
clip:<clip-source> | [<basic-shape> || <geometry-box> ] | none;
clip-path:polygon(x y,x1 y1....,xn yn)
clip-path:circle( r at x y)
clip-path:ellipse( r1 r2 at x y)
clip-path: inset(top right bottom left round top-radius right-radius bottom-radius left-radius)
.polygon{
-webkit-clip-path:polygon(0 100%, 50% 0, 100% 100%);
}
.circle{
-webkit-clip-path: circle(20% at 50% 50%);
}
.ellipse{
-webkit-clip-path: ellipse(30% 20% at 50% 50%);
}
.inset{
-webkit-clip-path: inset(25% 0 round 0 25%);
}
.text {
-webkit-clip-path: url(#svgTextPath);
clip-path: url(#svgTextPath);
}
svg:
<svg height="0" width="0">
<defs>
<clipPath id="svgTextPath">
<text x="10" y="250" textLength="200px" lengthAdjust="spacing" font-family="Vollkorn" font-size="50px" font-weight="700" font-style="italic"> 酷炫 </text>
</clipPath>
</defs>
</svg>
效果如下:
后續(xù)學(xué)習(xí)會繼續(xù)添加資料,如果您有更好的資料,歡迎在評論區(qū)提供!
更多建議: