搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
HTML/CSS
SVG 教程
SVG 元素
源代码
清空
点击运行
<svg width="200" height="100" style="border: 1px solid #cccccc;"> <defs> <clippath id="clipPath"> <rect x="15" y="15" width="40" height="40"></rect> </clippath> </defs> <circle cx="25" cy="25" r="20" style="fill: #0000ff; clip-path: url(#clipPath); "></circle> </svg> <svg width="200" height="100" style="border: 1px solid #cccccc;"> <defs> <clippath id="clipPath2"> <rect x="15" y="15" width="40" height="40"></rect> </clippath> </defs> <circle cx="25" cy="25" r="20" style="fill: #0000ff; clip-path: url(#clipPath2); "></circle> <rect x="15" y="15" width="40" height="40" style="stroke: #000000; fill:none;"></rect> </svg>
运行结果