在反应中,线性梯度的属性形式有些不同,应该是这样的:
<linearGradient id="linear-gradient" gradientUnits="userSpaceOnUse" x1="1041.6901" y1="169.485" x2="1383.9301" y2="169.485" gradientTransform="matrix(1 0 0 -1 -761.14 398.97)"> <stop offset="14%" stopColor="#2f343b" stopOpacity="0%"/> <stop offset="43%" stopColor="#337082" stopOpacity="41%"/> <stop offset="67%" stopColor="#369fb9" stopOpacity="73%"/> <stop offset="79%" stopColor="#37b1cf" stopOpacity="85%"/> </linearGradient>
它的意思是语法应该来自stop-color => stopColor
偏移量应为百分比
ReactJs + SVG



