How do you set a gradient that transitions from left to right?
- background: gradient(left right, color1, color2)
- background: linear-gradient(left, color1, color2)
- gradient: left-to-right(color1, color2)
- linear-gradient(right, color1, color2)
To set a gradient that transitions from left to right, use the background: linear-gradient(left, color1, color2) property. This ensures the gradient starts from the left side and progresses to the right side of the element.
Loading...
Related Quiz
- The cubic-bezier function for animation-timing-function takes in ______ arguments to define the curve.
- A style rule with a complex selector is not being applied as expected on a website. What should a developer investigate about the selector to determine why it has lower specificity than anticipated?
- In a design where text needs to appear as though it is glowing, what CSS property should be used to create this effect, and how should it be manipulated to achieve the glow?
- In a list where you want to style only list items that are not the first child, you'd use the pseudo-class ________.
- How can you specify a fallback font if the primary font fails to load?