Cool CSS Button with Hover Animation

In this tutorial we will see how to make a Cool CSS Button with Hover Animation. Simple CSS is used for this purpose, HTML code and CSS code is given.

HTML Code

HTML Code is given below.

<button class='btn'>Click Me</button>  

CSS Code

CSS Code is given below.

<style>
body
{
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.btn
{
    font-family: 'Barlow Condensed' ,sans-serif;
    position: relative;
    font-size: 30px;
    padding: 5px 20px;
    background-color: transparent;
    color: #FF0033;
    border: 5px solid #FF0033;
    box-shadow: 4px 4px 0px 0px #666;
    cursor: pointer;
    transition: 0.7s;
}
.btn::before
{
    position: absolute;
    content: '';
    left: 0px;
    top: 0px;
    width: 0%;
    height: 100%;
    background-color: #FF0033;
    transition: 0.4s;
    z-index: -1;
}
.btn:hover
{
    color: #fff;
}
.btn:hover::before
{
    width: 100%;
}
</style>

Video Tutorial

Watch our video tutorial on Cool CSS Button with Hover Animation.

Social Media Menu with Popup Tooltip using HTML and CSS Horizontal Navigation Menu with HTML and CSS Responsive Sidebar Menu with CSS and JavaScript Cool CSS Button with Hover Animation Pure CSS Custom Radio Buttons Custom Emoji Radio Buttons with CSS Color Picker Design with HTML CSS and JavaScript Custom Radio Buttons with CSS Engraved HTML Buttons With CSS Neumorphic Buttons Design with CSS Cool Profile Card Design with HTML CSS Neumorphic Search Bar Design with HTML and CSS Simple Login Form with Placeholder Animation Pure CSS Button with Folded Corner Background Color Change Slider with HTML CSS and JavaScript 404 Page Not Found Template Design with HTML and CSS Movies Blog Card Design with HTML and CSS Simple CSS Border Animation with before and after Selector Custom Social Select Dropdown Menu with CSS and JavaScript Facebook Offline and Online Notification with CSS and JS New Year 2022 Text Animation with CSS and JS Change Placeholder Color using CSS Custom Select Tag DropDown with CSS and JavaScript Simple Price Range Slider With HTML CSS and JavaScript Profile Card With Hover Effect using HTML and CSS Circle With Two Colors using CSS Simple FAQ Accordion With HTML CSS and JavaScript