html SVGでグラデーション

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html SVGでグラデーション相关的知识,希望对你有一定的参考价值。

<svg viewBox="0 0 200 200" width="200px" height="200px">

	<linearGradient id="grad-stroke" gradientUnits="userSpeceOnUse" x1="0" y1="75" y2="75">
		<stop offset="0" stop-color="#fcee21"></stop>
		<stop offset="1" stop-color="#ff7bac"></stop>
	</linearGradient>

	<!--
	objectBoundingBoxを指定すると、開始座標と終了座標は図形の大きさにマッチする
	-->
	<radialGradient id="grad-fill" gradientUnits="objectBoundingBox">
		<stop offset="0" stop-color="#cce0f4"></stop>
		<stop offset="1" stop-color="#0075be"></stop>
	</radialGradient>

	<circle fill="url('#grad-fill')" stroke="url('#grad-stroke')" stroke-width="20" cx="75" cy="75" r="65"></circle>
</svg>

以上是关于html SVGでグラデーション的主要内容,如果未能解决你的问题,请参考以下文章

scss 背景をグラデーション

scss 简単グラデーション

scss 170217背景をグラデーション

scss グラデーションテキスト

css CSSグラデーションアニメ

scss 线性渐变グラデーションhttp://www.webcreatorbox.com/tech/css-gradient/