html5 svg没有显示
我是html5 svg渲染新手。我试过这个:html5 svg没有显示,html,svg,Html,Svg,我是html5 svg渲染新手。我试过这个: <svg width="200" height="200"> <symbol viewBox="0 0 64 64" id="shape-phone"> <title>phone</title> <g> <rect x="16" y="1" fill="none" stroke-width="2" stroke-mi
<svg width="200" height="200">
<symbol viewBox="0 0 64 64" id="shape-phone">
<title>phone</title>
<g>
<rect x="16" y="1" fill="none" stroke-width="2" stroke-miterlimit="10" width="32" height="62"/>
<line fill="none" stroke-width="2" stroke-miterlimit="10" x1="28" y1="5" x2="36" y2="5"/>
<line fill="none" stroke-width="2" stroke-miterlimit="10" x1="16" y1="51" x2="48" y2="51"/>
<line fill="none" stroke-width="2" stroke-miterlimit="10" x1="16" y1="9" x2="48" y2="9"/>
<circle fill="none" stroke-width="2" stroke-linejoin="bevel" stroke-miterlimit="10" cx="32" cy="57" r="2"/>
</g>
</symbol>
</svg>
您定义了一个
,但需要用
显示它:
<use xlink:href="#shape-phone" x="0" y="0" width="64" height="64" />
符号未显示,因为未设置笔划
<svg width="200" height="200" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<symbol viewBox="0 0 64 64" id="shape-phone">
<g>
<rect x="16" y="1" stroke="#00ff00" fill="none" stroke-width="2" stroke-miterlimit="10" width="32" height="62"/>
<line fill="none" stroke="#00ff00" stroke-width="2" stroke-miterlimit="10" x1="28" y1="5" x2="36" y2="5"/>
<line fill="none" stroke="#00ff00" stroke-width="2" stroke-miterlimit="10" x1="16" y1="51" x2="48" y2="51"/>
<line fill="none" stroke="#00ff00" stroke-width="2" stroke-miterlimit="10" x1="16" y1="9" x2="48" y2="9"/>
<circle fill="none" stroke="#00ff00" stroke-width="2" stroke-linejoin="bevel" stroke-miterlimit="10" cx="32" cy="57" r="2"/>
</g>
</symbol>
<use xlink:href="#shape-phone" x="0" y="0" />
</svg>
您定义了一个
,但需要用
显示它:
<use xlink:href="#shape-phone" x="0" y="0" width="64" height="64" />
符号未显示,因为未设置笔划
<svg width="200" height="200" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<symbol viewBox="0 0 64 64" id="shape-phone">
<g>
<rect x="16" y="1" stroke="#00ff00" fill="none" stroke-width="2" stroke-miterlimit="10" width="32" height="62"/>
<line fill="none" stroke="#00ff00" stroke-width="2" stroke-miterlimit="10" x1="28" y1="5" x2="36" y2="5"/>
<line fill="none" stroke="#00ff00" stroke-width="2" stroke-miterlimit="10" x1="16" y1="51" x2="48" y2="51"/>
<line fill="none" stroke="#00ff00" stroke-width="2" stroke-miterlimit="10" x1="16" y1="9" x2="48" y2="9"/>
<circle fill="none" stroke="#00ff00" stroke-width="2" stroke-linejoin="bevel" stroke-miterlimit="10" cx="32" cy="57" r="2"/>
</g>
</symbol>
<use xlink:href="#shape-phone" x="0" y="0" />
</svg>