This is what I have so far:
homepageImage: {
position: "relative",
textAlign: "center",
height: "100vh",
backgroundImage: `linear-gradient(
#3A8DFF,
#86B9FF
), url("images/bg-img.png")`,
},
<div className={classes.homepageImage}>
I got the above code by referencing this Stackoverflow post, but I guess this method doesn't work with JSX? The colors with the gradient displays in the div, but the image does not appear. I can confirm the url is the correct path as I tested with an <img>
tag with "images/bg-img.png"
as the src and the image appears.
Would it be a better approach to create a gradient with the <img>
tag instead of the <div>
tag? Not sure where to go from here.