<!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML5自由者</title> <style> #svgForStroke { position: absolute; top: 0; left: 0; width: 200px; height: 200px; stroke-dasharray: 180%; stroke-dashoffset: 0%; stroke: #ED6E5C; /*stroke-linecap:round;*/ fill: none; -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -ms-transform: rotate(-90deg); -o-transform: rotate(-90deg); transform: rotate(-90deg); } </style> </head> <body> <svg id="svgForStroke" xmlns="http://www.w3.org/2000/svg"> <circle cx="50%" cy="50%" r="30%" stroke-width="10%"></circle> </svg> <script></script> </body> </html>
原文地址:http://blog.csdn.net/html5_/article/details/46583141