How can I change the color of the first few lines of text using css? Please check my snippet below, and all will be clear. I know that it is possible, but can't remember how... I have to be able to set a certain color for both halves.
.container{
max-width: 300px;
}
h1 {
position: relative;
font-family: verdana;
color: lightblue;
text-align: left;
}
h1:after{
content: "";
position: absolute;
left: 0px;
right: 0px;
top: 0px;
height: 50%;
background-color: rgb(255, 255, 255);
mix-blend-mode: difference;
}
<div class="container">
<h1>This is a very very long text, that should be written in the same element, but with two different colors</h1>
</div>