2016-11-08 68 views
0

我想創建一個簡單的SVG與橢圓元素,但在Safari(和只有Safari),它繪製所有非圓形橢圓加倍筆畫寬度。如果橢圓完全是圓形的(rx == ry),那麼它通常繪製它。safari svg與雙倍寬度的橢圓

有沒有人見過這種行爲之前,或有任何想法如何解決它?我在macOS 10.12.1,Safari 10.0.1(12602.2.14.0.7)上看到了這種行爲。它也只出現在我的視網膜顯示屏上(2014 MBP),而不是在外部非視網膜顯示屏上。

下面是我使用的HTML文件:

<!DOCTYPE html> 

<body> 

<style> 
    circle { 
    stroke: blue; 
    stroke-width: 3; 
    fill: none; 
    } 
    ellipse { 
    stroke: green; 
    stroke-width: 3; 
    fill: none; 
    } 
</style> 

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> 
    <circle cx="50" cy="50" r="40"/> <!--Draws with normal stroke--> 
    <circle cx="60" cy="60" r="40"/> <!--Draws with normal stroke--> 
    <ellipse cx="70" cy="70" rx="40" ry="20"/> <!--Draws with doubled stroke--> 
    <ellipse cx="80" cy="80" rx="20" ry="20"/> <!--Draws with normal stroke--> 
</svg> 

</body> 

而這裏的結果的截圖:

svg with doubled ellipse stroke

+0

如果您發現WebKit的錯誤,[舉報](https://webkit.org/reporting-bugs/) –

+0

它正確地在我看來,在Safari V10 https://jsfiddle.net/x2m2zyzv / – Duopixel

回答