Можно сделать при помощи маски, тогда только у текста будет уменьшаться непрозрачность.
<section>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Est vero veritatis, modi hic nam accusantium maxime minus. Rerum tempora libero, odio nisi veritatis deleniti inventore quas accusantium dolores dicta ea!</p>
<button>Read more</button>
</section>
<style>
section {
background: black;
color: white;
padding: 1em;
position: relative;
font-size: 150%;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(https://picsum.photos/200/300/?blur=2) center/cover;
max-width: 15em;
}
section > p {
--mask: linear-gradient(to bottom, red 10%, transparent);
-webkit-mask: var(--mask);
mask: var(--mask);
margin: 0;
text-indent: 0.5em;
text-align: justify;
}
section > button {
all: unset;
position: absolute;
bottom: 1.5em;
right: 0; left: 0;
margin: auto;
background: linear-gradient(to bottom, #3f749b, #78a5cc);
padding: 0.25em 0.75em;
border-radius: 1em;
text-shadow: 0 1px rgba(0, 0, 0, 0.5);
}
</style>
Или же поместить градиент над текстом, что затронет также и фон.
<section>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Est vero veritatis, modi hic nam accusantium maxime minus. Rerum tempora libero, odio nisi veritatis deleniti inventore quas accusantium dolores dicta ea!</p>
<button>Read more</button>
</section>
<style>
section {
background: black;
color: white;
padding: 1em;
position: relative;
font-size: 150%;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(https://picsum.photos/200/300/?blur=2) center/cover;
max-width: 15em;
}
section > button {
all: unset;
position: absolute;
bottom: 1.5em;
right: 0; left: 0;
margin: auto;
background: linear-gradient(to bottom, #3f749b, #78a5cc);
padding: 0.25em 0.75em;
border-radius: 1em;
text-shadow: 0 1px rgba(0, 0, 0, 0.5);
}
section > p {
margin: 0;
text-indent: 0.5em;
text-align: justify;
position: relative;
}
section > p::after {
content: "";
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: linear-gradient(to bottom, transparent, black);
margin: -1em;
pointer-events: none;
}
</style>