Answers for "fill color from left to right css"

CSS
0

Fill background color left to right CSS

div {
    font: 22px Arial;
    display: inline-block;
    padding: 1em 2em;
    text-align: center;
    color: white;
    background: red; /* default color */

    /* "to left" / "to right" - affects initial color */
    background: linear-gradient(to left, salmon 50%, lightblue 50%) right;
    background-size: 200%;
    transition: .5s ease-out;
}
div:hover {
    background-position: left;
}
Posted by: Guest on September-26-2021
0

Fill background color left to right CSS

<div>Hover me</div>
Posted by: Guest on April-22-2022

Code answers related to "fill color from left to right css"

Browse Popular Code Answers by Language