Open this example in the interactive library
Source code
<style>
.demo {
background-image: linear-gradient(to right, #dbeafe, #bae6fd);
}
</style>
<div class="demo">Set a linear gradient</div>
Set a linear gradient with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo {
background-image: linear-gradient(to right, #dbeafe, #bae6fd);
}
</style>
<div class="demo">Set a linear gradient</div>