SVG和文本在Safari上不起作用

时间:2018-07-13 09:28:36

标签: javascript html css svg

所以,我有一个倒数计时器,它是移动响应的,但是,它在iPhone上不起作用。我在android手机上对其进行了测试,它看起来很好,但是在我的iphone上,代码中的text属性并没有真正显示出它应该怎么做,我猜是因为“ x”和“ y”属性不起作用,任何人都知道必需的-webkit-,我在Google上找不到它。提前致谢。我的代码是:

<svg class="svgCountDown">
    <text class="days" x="40" y="-40" style="font-family:Verdana; font-size:20px;" fill="black" text-anchor="middle" alignment-baseline="baseline">'+(days == '' ? 0 : days)+'</text>
    <text class="days" x="40" y="-38" style="font-family:Verdana; font-size:10px;" fill="black" text-anchor="middle" alignment-baseline="hanging">days</text>
    <circle r="38" cx="40" cy="40" stroke="red" fill="none"></circle>
    <circle class="d" r="38" cx="40" cy="40" style="stroke-dashoffset:229px; stroke-dasharray: 239px;"></circle>
</svg>

0 个答案:

没有答案