Let's say I have a UI card with the following CSS properties:
.card {
flex-direction: column;
height: 20rem;
width: 14rem;
border-width: 1px;
border-radius: 0.375rem;
border-color: #444;
border-style: solid;
margin: 1.25rem;
}
.card-header {
display: flex;
justify-content: center;
}
.card-center {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
<div class="card">
<div class="card-header">
<span>header</span>
</div>
<div class="card-center">
<span>center</span>
</div>
</div>
https://i.sstatic.net/IAMHn.png
I am looking to replicate this design effect:
The objective is to create a blue gradient with adjustable dimensions using JavaScript based on user input.
Is there a method to accomplish this?