svg画图分享

来源:互联网 发布:四核网络机顶盒 编辑:程序博客网 时间:2024/06/06 09:12

源代码:

<!DOCTYPE HTML >

<html >
<head>
 <meta http-equiv="Content-Type" content="text/html:charset=utf-8" />
    <title>无标题页</title>
</head>
<body>
<div style=" width:900px ;  height:900px; background-color:White; ">
 <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
 
<defs>
<radialGradient id="grey_blue" cx="20%" cy="40%" r="50%"
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,0,255);
stop-opacity:1"/>
</radialGradient>
</defs>

 <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,0);
stop-opacity:1"/>
</linearGradient>
</defs>
    <circle cx="100" cy="100" r="40" fill="transparent" stroke="black" stroke-width="2px"> </circle>
    <polygon points="50,100  100,100  75,50" stroke="#660000" fill="#cc3333"> 
        <animateTransform 
            attributeName="transform" 
            begin="0s" 
            dur="10s" 
            type="rotate" 
            from="0 0 0" 
            to="360 60 60" 
            repeatCount="indefinite"  
        /> 
    </polygon> 
     <rect width="200" height="200" x="100" y="100" fill="red" rx="30" ry="30"></rect>
     <line x1="50" y1="50" x2="100" y2="100"  stroke="blue" stroke-width="5" stroke-opacity="0.5"></line>
   <ellipse cx="240" cy="100" rx="220" ry="30"style="fill:url(#orange_red)"/>
  
<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
C211 300 186 274 156 274"
style="fill:white;stroke:red;stroke-width:2"/>
   <defs>
<filter id="Gaussian_Blur">
<feGaussianBlur in="SourceGraphic" stdDeviation="3" />
</filter>
</defs>

<ellipse cx="400" cy="150" rx="70" ry="40"
style="fill:url(#grey_blue);stroke:#000000;
stroke-width:2;filter:url(#Gaussian_Blur)"/>
 </svg>
</div>
</body>
</html>

 

 

0 0