<svg xmlns="http://www.w3.org/2000/svg">
?? ?<defs>
?? ??? ?<linearGradient id="grad1" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="1" y2="1">
?? ??? ??? ?<stop offset="0" stop-color="#1497FC"></stop>
?? ??? ??? ?<stop offset="0.5" stop-color="#001122"></stop>
?? ??? ??? ?<stop offset="1" stop-color="#ABCDEF"></stop>
?? ??? ?</linearGradient>
?? ?</defs>
?? ?<rect x="100" y="100" fill="url(#grad1)" ></rect>
</svg>
<!-- 線性漸變 -->

洪爐百煉生
2014-10-06
1 回答
舉報
0/150
提交
取消
2016-08-26
我覺得你的代碼有問題
1 你沒有設置viewBox
2 你沒有設置矩形的高寬。