I would like to do this https://imgur.com/a/8QFD0l1 I want to change text from white to black color if it doesn't have the yellow background/img background. I tried to use mix-blend-mode and filter:invert() but it wasn't working for me.
Thanks for your help!
There is my current html/css.
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
img {
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
h1 {
font-size: 5rem;
}
p {
font-size: 2.25rem;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<h1>Headline</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.
Mollitia saepe reprehenderit nihil quam facere odio
eveniet modi in earum impedit non id, est vero. Non
culpa reprehenderit magni?
</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.
Alias, unde. Porro sunt neque ullam atque? Ipsam nesciunt
animi architecto! Consequatur maxime dolorum eius placeat
animi.
</p>
<img src="https://svgshare.com/i/R7P.svg" alt="">
</body>
</html>