2017-06-29 17 views
-1

グラデーションを使ってこの背景色を達成するにはどうすればよいですか?svgの背景にグラデーションの色を作成する方法

注:針、目盛り、ラベルは不要です。

enter image description here

サンプルリンク:http://jsfiddle.net/mkn9t627/4/

<svg height="500" width="500"> 
    <circle cx="150" cy="150" r="100" stroke="black" stroke-width="3" fill="transparent" /> 
</svg> 
+0

は、あなたが正確に背景について話しています(と一緒に明るいハイライト)か、その3つのうちの1つだけですか? –

+0

@PaulLeBeauはい、それは私が必要とするものです –

答えて

2

フィドル:https://jsfiddle.net/oLsLdqas/1/

<svg height="250" width="500"> 
    <defs> 
    <radialGradient id="grad1" cx="50%" cy="50%" r="50%" fx="60%" fy="20%"> 
     <stop offset="0%" style="stop-color:rgb(0,0,0);stop-opacity:0" /> 
     <stop offset="100%" style="stop-color:rgb(1,1,1);stop-opacity:1" /> 
    </radialGradient> 
    </defs> 
    <circle cx="180" cy="100" r="100" fill="url(#grad1)" /> 

</svg> 

詳細については、リンクを参照してください。提示されるようhttps://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Gradients

関連する問題