简单教程
提交运行
代码编辑器:
<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <filter id="test" filterUnits="objectBoundingBox" x="0" y="0" width="1.5" height="4"> <feOffset result="Off1" dx="15" dy="20"/> <feFlood style="flood-color:#ff0000;flood-opacity:0.8"/> <feComposite in2="Off1" operator="in" result="C1"/> <feOffset in="SourceGraphic" result="Off2" dx="30" dy="40"/> <feFlood style="flood-color:#ff0000;flood-opacity:0.4"/> <feComposite in2="Off2" operator="in" result="C2"/> <feMerge> <feMergeNode in="C2"/> <feMergeNode in="C1"/> <feMergeNode in="SourceGraphic"/> </feMerge> </filter> </defs> <text x="30" y="100" style="font:36px verdana bold;fill:blue;filter:url(#test)">This is some text!</text> </svg>
运行结果: