一,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 />
</svg>
</body>
</html>

SVG的使用

 

相关文章:

  • 2022-01-01
  • 2022-12-23
  • 2021-08-18
  • 2021-09-16
  • 2022-12-23
  • 2021-09-19
  • 2021-12-25
  • 2022-12-23
猜你喜欢
  • 2021-06-09
  • 2021-05-17
  • 2021-10-15
  • 2021-10-02
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案