w3tweaks.com
  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Script
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
  • Tools
w3tweaks.com
Home CSS Code Demos

CSS Button Concept for Remove and Success

August 21, 2019
in CSS Code Demos

A cool little css Button concept for delete success with hover animation with close/delete icon and developed using CSS, HTML and JavaScript. Demo and download available.

You might also like

CSS Shapes Forest Collection Spring Summer 2020

Three Pure different CSS Button effects

Easy customizable simple CSS buttons

Rounded CSS buttons with mouseover effect

Collection of CSS3 animated buttons to spice up your site

CSS buttons using unicode symbols

Demo Download

AuthorChris Deacy
CreatedMARCH 20, 2015
LicenseOpen
Compatible browsersChrome, Firefox, Safari
[ads1]

 

HTML Snippet

<a class="button" href="#" role="button"> <span>remove</span>
    <div class="icon"> <i class="fa fa-remove"></i> <i class="fa fa-check"></i> </div>
</a>

CSS Code



.button {
    display: block;
    background-color: #c0392b;
    width: 300px;
    height: 100px;
    line-height: 100px;
    margin: auto;
    color: #fff;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    cursor: pointer;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.25s cubic-bezier(0.31, -0.105, 0.43, 1.4);
}

.button span,
.button .icon {
    display: block;
    height: 100%;
    text-align: center;
    position: absolute;
    top: 0;
}

.button span {
    width: 72%;
    line-height: inherit;
    font-size: 22px;
    text-transform: uppercase;
    left: 0;
    transition: all 0.25s cubic-bezier(0.31, -0.105, 0.43, 1.4);
}

.button span:after {
    content: '';
    background-color: #a53125;
    width: 2px;
    height: 70%;
    position: absolute;
    top: 15%;
    right: -1px;
}

.button .icon {
    width: 28%;
    right: 0;
    transition: all 0.25s cubic-bezier(0.31, -0.105, 0.43, 1.4);
}

.button .icon .fa {
    font-size: 30px;
    vertical-align: middle;
    transition: all 0.25s cubic-bezier(0.31, -0.105, 0.43, 1.4), height 0.25s ease;
}

.button .icon .fa-remove {
    height: 36px;
}

.button .icon .fa-check {
    display: none;
}

.button.success span,
.button:hover span {
    left: -72%;
    opacity: 0;
}

.button.success .icon,
.button:hover .icon {
    width: 100%;
}

.button.success .icon .fa,
.button:hover .icon .fa {
    font-size: 45px;
}

.button.success {
    background-color: #27ae60;
}

.button.success .icon .fa-remove {
    display: none;
}

.button.success .icon .fa-check {
    display: inline-block;
}

.button:hover {
    opacity: .9;
}

.button:hover .icon .fa-remove {
    height: 46px;
}

.button:active {
    opacity: 1;
}

JavaScript Snippet

Below js code will add and remove ‘success’ class from the button when button clicked to animate the button.

(function() {
    var removeSuccess;
    removeSuccess = function() {
        return $('.button').removeClass('success');
    };
    $(document).ready(function() {
        return $('.button').click(function() {
            $(this).addClass('success');
            return setTimeout(removeSuccess, 3000);
        });
    });
}).call(this);

Preview

CSS Button Concept for Remove and Success preview

Tags: animationButtonclick buttonsConceptCSScss buttonsdeleteeffectessentialshoverhover animationhtmlremoveSuccess
Previous Post

Three Pure different CSS Button effects

Next Post

Sketched up Pure CSS Next button with animated SVG arrow icon

Related Stories

CSS Shapes Forest Collection Spring Summer 2020
CSS Code Demos

CSS Shapes Forest Collection Spring Summer 2020

October 11, 2020
Three Pure different CSS Button effects
CSS Code Demos

Three Pure different CSS Button effects

September 25, 2019
Easy customizable simple CSS buttons
CSS Code Demos

Easy customizable simple CSS buttons

September 8, 2019
Rounded CSS buttons with mouseover effect
CSS Code Demos

Rounded CSS buttons with mouseover effect

September 8, 2019
Collection of CSS3 animated buttons to spice up your site
CSS Code Demos

Collection of CSS3 animated buttons to spice up your site

September 8, 2019
CSS buttons using unicode symbols
CSS Code Demos

CSS buttons using unicode symbols

September 20, 2019
CSS Letter Bouncing Animation Text effect
CSS Code Demos

CSS Letter Bouncing Animation Text effect

September 19, 2019
CSS Animated Modal Window
CSS Code Demos

CSS Animated Modal Window

September 21, 2019

Discussion about this post

Follow Us

Popular Posts

100 Creative CSS Cards

44 Free Multi step HTML forms

13 Free HTML & CSS Dashboard Template Designs

49 CSS Tables

20 HTML & CSS pricing tables

14 Best CSS Dark Mode

11 CSS Shopping Cart UI/UX

42 Cool CSS Avatars For Better UI

55 Useful handpicked CSS Buttons with examples and demos

89 Best CSS Toggle Switches

w3tweaks

We bring you the best frontend collections that will fix perfect for news, magazine, personal blog, etc. Check our landing page for details.

  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Script
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
  • Tools