html5 SVG 涂鸦

<!DOCTYPE HTML>
<html>
<body>

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="1000px" height="800px">

<rect
	x="20" 
	y="20" 
	rx="20" 
	ry="20" 
	width="250" 
	height="100" 
	style="fill:red;stroke:black;stroke-width:5;fill-opacity:0.5;stroke-opacity:0.5"/>

<circle 
	cx="100" 
	cy="160" 
	r="40" 
	stroke="black"
	stroke-width="2" 
	fill="red"
	style="fill:green;opacity:0.5"/>


<ellipse cx="240" cy="230" rx="220" ry="30" style="fill:purple"/>

<ellipse cx="220" cy="270" rx="190" ry="20" style="fill:lime"/>

<ellipse cx="210" cy="345" rx="170" ry="15" style="fill:yellow"/>

<line x1="0" y1="0" x2="300" y2="300" style="stroke:rgb(99,99,99);stroke-width:2"/>

<polygon points="220,400 300,610 170,650 123,434" style="fill:#cccccc; stroke:#000000;stroke-width:1"/>

<polyline points="400,0 400,20 420,40 440,60" style="fill:white;stroke:red;stroke-width:2"/>

<path d="M153 334
C153 334 151 334 151 334
C151 339 153 344 156 344
C164 344 171 339 171 334
C171 322 164 314 156 314
C142 314 131 322 131 334
C131 350 142 364 156 364
C175 364 191 350 191 334
C191 311 175 294 156 294
C131 294 111 311 111 334
C111 361 131 384 156 384
C186 384 211 361 211 334
C411 300 886 674 500 600"
style="stroke:red;stroke-width:2"/>

<defs>
	<filter id="Gaussian_Blur">
		<feGaussianBlur in="SourceGraphic" stdDeviation="20"/>
	</filter>
</defs>

<ellipse 
	cx="500" 
	cy="150" 
	rx="70" 
	ry="40"
	style="fill:#ff0000;stroke:#000000;stroke-width:2;filter:url(#Gaussian_Blur)"/>

<defs>
	<linearGradient id="orange_red" x1="0%" y1="0%" x2="100%" y2="0%">
		<stop offset="0%" style="stop-color:rgb(255,255,0);stop-opacity:1"/>
		<stop offset="100%" style="stop-color:rgb(255,0);stop-opacity:1"/>
	</linearGradient>
</defs>

<ellipse cx="720" cy="190" rx="85" ry="55" style="fill:url(#orange_red)"/>


<defs>
	<radialGradient id="grey_blue" cx="50%" cy="50%" r="80%" fx="50%" fy="50%">
		<stop offset="0%" style="stop-color:rgb(200,200,200);stop-opacity:0"/>
		<stop offset="100%" style="stop-color:rgb(0,255);stop-opacity:1"/>
	</radialGradient>
</defs>

<ellipse cx="750" cy="400" rx="110" ry="100" style="fill:url(#grey_blue)"/>

</svg>

</body>
</html>

相关文章

HTML5和CSS3实现3D展示商品信息的代码
利用HTML5中的Canvas绘制笑脸的代码
Html5剪切板功能的实现
如何通过HTML5触摸事件实现移动端简易进度条
Html5移动端获奖无缝滚动动画实现
关于HTML5和CSS3实现机器猫的代码