<!DOCTYPE html>
<html>
<head>
<style>
#container {
position: relative;
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="16" height="16" fill="%23fff"/><rect x="8" y="0" width="8" height="8" fill="%23C8C8C8"/><rect x="0" y="8" width="8" height="8" fill="%23C8C8C8"/></svg>');
background-size: 16px auto;
}
</style>
</head>
<body>
<div id="container">
<svg viewBox="0 0 240 240" xmlns="http://www.w3.org/2000/svg" width="240" height="240">
svg使用mask实现镂空效果
最新推荐文章于 2024-05-17 09:09:41 发布