我创建了1000×1000 svg
,但是当我在Chrome browser
中运行它时,如果视口大小小于1000,则会自动裁剪svg image
,尽管如此,但我没有看到这个问题在jsFiddle
中!我很好奇是否与视口尺寸有关?看看我在想什么:
<svg viewbox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
<path d="M100 100 h800 v800 h-800 v-800" fill="black" stroke="red" stroke-width="8" style=" stroke-dasharray: 4000;
stroke-dashoffset: 4000;
animation: dash 2s linear forwards infinite;" /><style>@keyframes dash {
to {
stroke-dashoffset: 0;
}
}</style>
<text x="120" y="200" fill="skyblue" style="font-size:30;">
1: We do not endorse 'Aarogya Setu App'.
<tspan x="120" y="300">
2: To use this App you have to share
</tspan>
<tspan x="120" y="400">
your Name, Age, Sex, Location, Job and
</tspan>
<tspan x="120" y="500">
other details with govt authorities.
</tspan>
<tspan x="120" y="600">
3: Also these details are transferred to
</tspan>
<tspan x="120" y="700">
nearby devices, via bluetooth using an
</tspan>
<tspan x="120" y="800">
encryption model, use only if you trust
</tspan>
<tspan x="120" y="870">
your govt.
</tspan>
</text>
</svg>
这里是jsFiddle
链接:https://jsfiddle.net/3fuh7ntj/要在浏览器中查看以上svg
,请单击此处:https://covidnmap.000webhostapp.com/graphics.svg
我已经检查过最新版本的Chrome,Firefox和Brave浏览器。但是没有注意到任何这样的问题。您正在使用更新的浏览器吗?