Fri Aug 04 2023

Simple Button Hover Animation

CSS86 views
Simple Button Hover Animation

File Name: simple-button-hover-effect.html

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="preconnect" href="">
    <link rel="preconnect" href="" crossorigin>
    <link href="" rel="stylesheet">    
    <title>Simple Button Hover Effect</title>
        * {
            padding: 0;
            margin: 0;
            font-family: 'Roboto', sans-serif;

        body {
            background-color: #292929;

        section {
            width: 100%;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;

        .btn {
            border: none;
            padding: 8px 25px;
            font-size: 20px;
            border-radius: 2px;
            cursor: pointer;
            background-color: #ffeadd;
            color: #ff6666;
            box-shadow: 0 5px 8px 2px #1b1b1b;
            transition: 0.3s all ease-in-out;
            transition: 0.5s box-shadow ease-in-out;

        .btn:hover {
            background-color: #ff6666;
            color: #ffeadd;
            box-shadow: 0 0 12px 2px #ffeadd;

        <button type="button" class="btn">Hover Me</button>

Result Screenshot(s)

Simple Button Hover AnimationWorking Sample0

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.