为什么最后一个圆圈比其他圆圈更大胆?

时间:2017-05-25 04:11:11

标签: html css svg

我有三个相同stroke-width的圆圈svg元素,但最后一个更大胆 这是svg代码:

<div>
    <svg width="114" height="114">
        <circle stroke="#6d86c7" stroke-dashoffset="62.02111948377269" stroke-dasharray="62.02111948377269,258.4213311823862" r="51" cx="50%" cy="50%"></circle>
        <circle stroke="#e05c5c" stroke-dashoffset="165.38965195672716" stroke-dasharray="103.36853247295448,217.07391819320443" r="51" cx="50%" cy="50%"></circle>
        <circle stroke="#f6a623" stroke-dashoffset="320.4424506661589" stroke-dasharray="155.05279870943173" r="51" cx="50%" cy="50%"></circle>
    </svg>
</div>

结果如下:

the result look like this

似乎最后一个总是变得更大胆......

1 个答案:

答案 0 :(得分:2)

发生这种情况的原因是因为所有三个圈子都有白色'memcached' => [ 'driver' => 'memcached', // To use the options we need to install the PHP driver: sudo yum install php-memcached 'options' => [ Memcached::OPT_CONNECT_TIMEOUT => 3, Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT, Memcached::OPT_SERVER_FAILURE_LIMIT => 2, Memcached::OPT_REMOVE_FAILED_SERVERS => true, Memcached::OPT_RETRY_TIMEOUT => 1, ], 'servers' => [ [ 'host' => 'xxx.xxx.xxx.xxx', 'port' => 11211, 'weight' => 90, ], ] ], 'memcached249' => [ 'driver' => 'memcached', // To use the options we need to install the PHP driver: sudo yum install php-memcached 'options' => [ Memcached::OPT_CONNECT_TIMEOUT => 3, Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT, Memcached::OPT_SERVER_FAILURE_LIMIT => 2, Memcached::OPT_REMOVE_FAILED_SERVERS => true, Memcached::OPT_RETRY_TIMEOUT => 1, ], 'servers' => [ [ 'host' => 'xxx.xxx.xxx.xxx', 'port' => 11211, 'weight' => 100, ], ] ], 。绘制每个时,白色填充将覆盖前一个圆的笔划的内部部分。请记住,笔划是绘制的,因此它们是半个内部,一半是外部的圆圈。

解决方案是只将白色填充放在三个圆圈中的第一个上。

return [
    'fallback_order' => [
        'memcached',
        'memcached249',
        'file',
    ]
];
fill