首页 > Web开发 > 详细

HTML5 SVG

时间:2016-08-26 09:08:03      阅读:222      评论:0      收藏:0      [点我收藏+]

SVG

1.1 SVG 简介 — 使用方式

  • 浏览器直接打开
  • 在 HTML 中使用 <img> 标签中的 src 属性引用
  • 直接在 HTML 中使用 SVG 标签
  • 作为 css 的背景使用

 

1.2 基本图形和属性

  • 基本图形:<rect>(矩形),<circle>(圆形),<ellipse>(椭圆),<line>(直线),<polyline>(折线),<polygon>(多边形)
  • 基本属性:fill,stroke,stroke-width,transform

1.2.1 <rect>

<rect x="10" y="10" width="100" height="100" stroke="#f00" stroke-width="5" fill="none"></rect>

技术分享

1.2.2 <circle>

<circle cx="200" cy="60 " r="50" stroke="#f00" stroke-width="5" fill="none"></circle>

技术分享

1.2.3 <ellipse>

<ellipse cx="340" cy="60" rx="50" ry="30" stroke="#f00" stroke-width="5" fill="none"></ellipse>

技术分享

1.2.4 <line>

<line x1="420" y1="50" x2="550" y2="90" stroke="#f00" stroke-width="5"></line>

技术分享

1.2.5 <polyline>

<polyline points="600 90 700 50 800 70 850 100" stroke="#f00" stroke-width="5" fill="none"></polyline>

技术分享

1.2.6 <polygon>

<polygon points="900 90 950 50 1000 70 1050 110" stroke="#f00" stroke-width="5" fill="none"></polygon>

技术分享

 

 


 

 

 


 


 


 

 

 

 

 

 

HTML5 SVG

原文:http://www.cnblogs.com/xiaochechang/p/5808987.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!