svg基础

1:什么是svg?

  百度文科是这样说的?

 

 

svg初体验:

   css

.svg{
        width:100px;
        height:100px;
         background:url(regint.svg);
         background-repeat: no-repeat;
        } 

html

<body>
    <div class="svg"></div>
</body>

svg

<svg width="640" height="480" xmlns="http://www.w3.org/2000/svg">
 <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
 <defs>
  <radialGradient id="svg_1" cx="0.41" cy="0.34" r="0.53" fx="0.1" fy="0.1">
   <stop offset="0" stop-color="#7b9af7"/>
   <stop offset="1" stop-color="#cde0f4"/>
  </radialGradient>
 </defs>
 <g>
  <title>Layer 1</title>
  <rect fill="url(#svg_1)" stroke="#000000" stroke-width="0" x="112" y="112" width="425" height="214" id="svg_2"/>
 </g>
</svg>

实现的效果

 

posted @ 2016-02-04 14:13  舒莉  阅读(99)  评论(0编辑  收藏  举报