我有下一个 svg :
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="483px" height="255px">
<path fill-rule="evenodd" fill="rgb(0, 0, 0)"
d="M-0.000,-0.001 L483.001,1.873 L266.099,254.997 L-0.000,254.997 L-0.000,-0.001 Z"/>
</svg>
https://i.stack.imgur.com/1pdB7.png https://i.stack.imgur.com/1pdB7.png
如何插入具有位置中心和不重复属性的完整背景图像?就像这个例子一样:
https://i.stack.imgur.com/tUqbr.png https://i.stack.imgur.com/tUqbr.png
我真的很感谢你的回答,
谢谢你!
您可以使用该路径作为剪切路径,如下所示:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="483px" height="255px">
<defs>
<clipPath id="theClippingPath" >
<path
d="M-0.000,-0.001 L483.001,1.873 L266.099,254.997 L-0.000,254.997 L-0.000,-0.001 Z"/>
</clipPath>
</defs>
<image xlink:href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/222579/beagle400.jpg" height="485" width="485" clip-path="url(#theClippingPath)"></image>
</svg>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)