DEV Community

Avabucks
Avabucks

Posted on

BUTTON HTML & CSS

Button Fill Background with HTML & CSS

Preview

HTML:

<div class="butt-cont">
    <button class="button-fill fill-left">
        Left Animation
    </button>
    <button class="button-fill fill-right">
        Right Animation
    </button>
    <button class="button-fill fill-top">
        Top Animation
    </button>
    <button class="button-fill fill-bottom">
        Bottom Animation
    </button>
</div>
Enter fullscreen mode Exit fullscreen mode

CSS:

.butt-cont {
    /* Full code available on https://www.avabucks.it/ */
}

.button-fill {
    /* Full code available on https://www.avabucks.it/ */
}
.button-fill::after {
    /* Full code available on https://www.avabucks.it/ */
}

.fill-left::after {
    /* Full code available on https://www.avabucks.it/ */
}
.fill-right::after {
    /* Full code available on https://www.avabucks.it/ */
}
.fill-top::after {
    /* Full code available on https://www.avabucks.it/ */
}
.fill-bottom::after {
    /* Full code available on https://www.avabucks.it/ */
}

.button-fill:hover {
    /* Full code available on https://www.avabucks.it/ */
}
.button-fill:hover::after {
    /* Full code available on https://www.avabucks.it/ */
}

@media only screen and (max-width: 830px) {

    .butt-cont {
        /* Full code available on https://www.avabucks.it/ */
    }

}
Enter fullscreen mode Exit fullscreen mode

Full code available on BoxCoding

Top comments (0)