CSS3 Animated buttons

Size
3,737 Kb
Views
42,504

How do I make an css3 animated buttons?

Based on a Dribbble project by Dale Humphries (http://dribbble.com/shots/1133923-Send). What is a css3 animated buttons? How do you make a css3 animated buttons? This script and codes were developed by Clément Guillou on 04 July 2022, Monday.

CSS3 Animated buttons Previews

CSS3 Animated buttons - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS3 Animated buttons</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ /* Import icon-font and webfont */
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300);
@import url(http://weloveiconfonts.com/api/?family=fontawesome);
/* fontawesome */
[class*="fontawesome-"]:before { font-family: 'FontAwesome', sans-serif;
}
/* General styles */
body { background-color: #E6E6E6;
}
a { text-decoration: none;
}
/* Button styles */
.button { width: 160px; height: 60px; margin: 5% auto; overflow: hidden; border-radius: 5px; border: 2px solid; transition: background 0.3s ease;
}
.button ul { width: 330px; height: 60px; position: relative; transition: left 0.3s ease;
}
.button ul:target { left: -160px;
}
.button ul li { width: 160px; height: 60px; float: left; color: white; font-family: 'Open Sans', Verdana; font-size: 1.8em; line-height: 60px; text-align: center;
}
.button ul li span { vertical-align: top; margin-left: 15px; font-size: 0.8em;
}
/* Colors styles */
.green { background-color: #4cbe83; border-color: #36ad6f;
}
.green:hover { background-color: #36ad6f;
}
.red { background-color: #e47c68; border-color: #d46c57;
}
.red:hover { background-color: #d46c57;
}
.yellow { background-color: #feb742; border-color: #eda93b;
}
.yellow:hover { background-color: #eda93b;
}
.blue { background-color: #77d3e0; border-color: #6cc8d4;
}
.blue:hover { background-color: #6cc8d4;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="button green"> <a href="#sent-green"> <ul id="sent-green"> <li class="fontawesome-envelope"> <span>Send</span> </li> <li class="fontawesome-ok"> <span>Sent!</span> </li> </ul> </a>
</div>
<div class="button blue"> <a href="#sent-blue"> <ul id="sent-blue"> <li class="fontawesome-envelope"> <span>Send</span> </li> <li class="fontawesome-ok"> <span>Sent!</span> </li> </ul> </a>
</div>
<div class="button red"> <a href="#sent-red"> <ul id="sent-red"> <li class="fontawesome-envelope"> <span>Send</span> </li> <li class="fontawesome-ok"> <span>Sent!</span> </li> </ul> </a>
</div>
<div class="button yellow"> <a href="#sent-yellow"> <ul id="sent-yellow"> <li class="fontawesome-envelope"> <span>Send</span> </li> <li class="fontawesome-ok"> <span>Sent!</span> </li> </ul> </a>
</div> <script src="js/index.js"></script>
</body>
</html>

CSS3 Animated buttons - Script Codes CSS Codes

/* Import icon-font and webfont */
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300);
@import url(http://weloveiconfonts.com/api/?family=fontawesome);
/* fontawesome */
[class*="fontawesome-"]:before { font-family: 'FontAwesome', sans-serif;
}
/* General styles */
body { background-color: #E6E6E6;
}
a { text-decoration: none;
}
/* Button styles */
.button { width: 160px; height: 60px; margin: 5% auto; overflow: hidden; border-radius: 5px; border: 2px solid; transition: background 0.3s ease;
}
.button ul { width: 330px; height: 60px; position: relative; transition: left 0.3s ease;
}
.button ul:target { left: -160px;
}
.button ul li { width: 160px; height: 60px; float: left; color: white; font-family: 'Open Sans', Verdana; font-size: 1.8em; line-height: 60px; text-align: center;
}
.button ul li span { vertical-align: top; margin-left: 15px; font-size: 0.8em;
}
/* Colors styles */
.green { background-color: #4cbe83; border-color: #36ad6f;
}
.green:hover { background-color: #36ad6f;
}
.red { background-color: #e47c68; border-color: #d46c57;
}
.red:hover { background-color: #d46c57;
}
.yellow { background-color: #feb742; border-color: #eda93b;
}
.yellow:hover { background-color: #eda93b;
}
.blue { background-color: #77d3e0; border-color: #6cc8d4;
}
.blue:hover { background-color: #6cc8d4;
}

CSS3 Animated buttons - Script Codes JS Codes

/* * Based on a Dribbble project by Dale Humphries * (http://dribbble.com/shots/1133923-Send) * */
CSS3 Animated buttons - Script Codes
CSS3 Animated buttons - Script Codes
Home Page Home
Developer Clément Guillou
Username cguillou
Uploaded July 04, 2022
Rating 4.5
Size 3,737 Kb
Views 42,504
Do you need developer help for CSS3 Animated buttons?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Clément Guillou (cguillou) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!