首页 > 其他 > 详细

SVG的使用

时间:2016-11-30 03:35:47      阅读:180      评论:0      收藏:0      [点我收藏+]

一,svg可以在浏览器中直接打开

二,在html使用<img/>标签引用

三,直接在html中使用svg标签

四,作为css背景

SVG支持ie9+ ,chrome 33.0+,firefox 28.0+,safari 7.0+

下面是一个结合了html5中的知识做简单的小demo

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>SVG</title>
<style type="text/css">
#progress {
stroke-dasharray: 100px;
stroke-dashoffset: 100px;
}
#progress {
stroke-dasharray: 100px;
stroke-dashoffset: 100px;
animation: progressAnimation 2000ms linear infinite;
}

@keyframes progressAnimation {
from {
stroke-dashoffset: 100px;
}
to {
stroke-dashoffset: 300px;
}
}

</style>
</head>
<body>
<svg width="240" height="240" xmlns="">
<circle r="90" cy="120" cx="120" stroke-width="3" stroke="#333" fill="none"/>
<circle id="progress" r="90" cy="120" cx="120" stroke-width="3" stroke="#00ff00" fill="none"/>
</svg>
</body>
</html>

技术分享

 

SVG的使用

原文:http://www.cnblogs.com/luoguixin/p/6116070.html

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