Fill an SVG shape with a gradient
问题 How can I apply Linear gradient and drop shadow to this pattern? <svg viewbox="0 0 60 10"> <pattern x="-8" id="waves" patternUnits="userSpaceOnUse" width="10" height="10"> <path d="M0 10 V5 Q2.5 3.5 5 5 T10 5 V10" fill="#FFC338" /> </pattern> <rect x="0" y="0" width="60" height="7" fill="url(#waves)" /> </svg> 回答1: As commented by Paul LeBeau, you need to convert the wavy shape to one path, then you can fill the wavy shape with a linear gradient as shown in this example: <svg viewbox="7.5 0