CSS3 Buttons
How do I make an css3 buttons?
What is a css3 buttons? How do you make a css3 buttons? This script and codes were developed by Benjamin on 02 February 2023, Thursday.
CSS3 Buttons - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS3 Buttons</title> <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! */ body{ background:url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/wild_oliva.png);
}
.centered { margin:50px auto; text-align:center;
}
.button::-moz-focus-inner{ border: 0; padding: 0;
}
.button{ display: inline-block; *display: inline; zoom: 1; padding: 6px 20px; margin: 0; cursor: pointer; border: 1px solid #bbb; overflow: visible; font: bold 13px arial, helvetica, sans-serif; text-decoration: none; white-space: nowrap; color: #555; background-color: #ddd; background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,1)), to(rgba(255,255,255,0))); background-image: -webkit-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); background-image: -moz-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); background-image: -ms-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); background-image: -o-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); background-image: linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); -webkit-transition: background-color .2s ease-out; -moz-transition: background-color .2s ease-out; -ms-transition: background-color .2s ease-out; -o-transition: background-color .2s ease-out; transition: background-color .2s ease-out; background-clip: padding-box; /* Fix bleeding */ -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset; box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset; text-shadow: 0 1px 0 rgba(255,255,255, .9); -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
.button:hover{ background-color: #eee; color: #555;
}
.button:active{ background: #e9e9e9; position: relative; top: 1px; text-shadow: none; -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset; box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
}
.button[disabled], .button[disabled]:hover, .button[disabled]:active{ border-color: #eaeaea; background: #fafafa; cursor: default; position: static; color: #999; /* Usually, !important should be avoided but here it's really needed :) */ -moz-box-shadow: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; text-shadow: none !important;
}
/* Smaller buttons styles */
.button.small{ padding: 4px 12px;
}
/* Larger buttons styles */
.button.large{ padding: 12px 30px; text-transform: uppercase;
}
.button.large:active{ top: 2px;
}
/* Colored buttons styles */
.button.green, .button.red, .button.blue { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.2); background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,.3)), to(rgba(255,255,255,0))); background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
}
/* */
.button.green{ background-color: #57a957; border-color: #57a957;
}
.button.green:hover{ background-color: #62c462;
}
.button.green:active{ background: #57a957;
}
/* */
.button.red{ background-color: #ca3535; border-color: #c43c35;
}
.button.red:hover{ background-color: #ee5f5b;
}
.button.red:active{ background: #c43c35;
}
/* */
.button.blue{ background-color: #269CE9; border-color: #269CE9;
}
.button.blue:hover{ background-color: #70B9E8;
}
.button.blue:active{ background: #269CE9;
}
/* */
.green[disabled], .green[disabled]:hover, .green[disabled]:active{ border-color: #57A957; background: #57A957; color: #D2FFD2;
}
.red[disabled], .red[disabled]:hover, .red[disabled]:active{ border-color: #C43C35; background: #C43C35; color: #FFD3D3;
}
.blue[disabled], .blue[disabled]:hover, .blue[disabled]:active{ border-color: #269CE9; background: #269CE9; color: #93D5FF;
}
/* Group buttons */
.button-group,
.button-group li{ display: inline-block; *display: inline; zoom: 1;
}
.button-group{ font-size: 0; /* Inline block elements gap - fix */ margin: 0; padding: 0; background: rgba(0, 0, 0, .1); border-bottom: 1px solid rgba(0, 0, 0, .1); padding: 7px; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px;
}
.button-group li{ margin-right: -1px; /* Overlap each right button border */
}
.button-group .button{ font-size: 13px; /* Set the font size, different from inherited 0 */ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
}
.button-group .button:active{ -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset; -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset; box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
}
.button-group li:first-child .button{ -moz-border-radius: 3px 0 0 3px; -webkit-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px;
}
.button-group li:first-child .button:active{ -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset; -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset; box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
}
.button-group li:last-child .button{ -moz-border-radius: 0 3px 3px 0; -webkit-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0;
}
.button-group li:last-child .button:active{ -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset; -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset; box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="centered">
<button class="small button">Button</button>
<button class="small red button">Button</button>
<button class="small green button">Button</button>
<button class="small blue button">Button</button>
<br><br>
<button class="small button" disabled>Button</button>
<button class="small red button" disabled>Button</button>
<button class="small green button" disabled>Button</button>
<button class="small blue button" disabled>Button</button>
<br><br>
<ul class="button-group">
<li><button class="small button">Button</button></li>
<li><button class="small button">Button</button></li>
<li><button class="small button">Button</button></li>
<li><button class="small button">Button</button></li>
</ul>
<br><br><br><br>
<button class="button">Button</button>
<button class="red button">Button</button>
<button class="green button">Button</button>
<button class="blue button">Button</button>
<br><br>
<button class="button" disabled>Button</button>
<button class="red button" disabled>Button</button>
<button class="green button" disabled>Button</button>
<button class="blue button" disabled>Button</button>
<br><br>
<ul class="button-group">
<li><button class="button">Button</button></li>
<li><button class="button">Button</button></li>
<li><button class="button">Button</button></li>
<li><button class="button">Button</button></li>
</ul>
<br><br><br><br>
<button class="large button">Button</button>
<button class="large red button">Button</button>
<button class="large green button">Button</button>
<button class="large blue button">Button</button>
<br><br>
<button class="large button" disabled>Button</button>
<button class="large red button" disabled>Button</button>
<button class="large green button" disabled>Button</button>
<button class="large blue button" disabled>Button</button>
<br><br>
<ul class="button-group">
<li><button class="large button">Button</button></li>
<li><button class="large button">Button</button></li>
<li><button class="large button">Button</button></li>
<li><button class="large button">Button</button></li>
</ul> <br><br> <ul class="button-group">
<li><button class="large red button">Button</button></li>
<li><button class="large red button">Button</button></li>
<li><button class="large red button">Button</button></li>
<li><button class="large red button">Button</button></li>
</ul>
</div>
</body>
</html>
CSS3 Buttons - Script Codes CSS Codes
body{ background:url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/wild_oliva.png);
}
.centered { margin:50px auto; text-align:center;
}
.button::-moz-focus-inner{ border: 0; padding: 0;
}
.button{ display: inline-block; *display: inline; zoom: 1; padding: 6px 20px; margin: 0; cursor: pointer; border: 1px solid #bbb; overflow: visible; font: bold 13px arial, helvetica, sans-serif; text-decoration: none; white-space: nowrap; color: #555; background-color: #ddd; background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,1)), to(rgba(255,255,255,0))); background-image: -webkit-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); background-image: -moz-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); background-image: -ms-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); background-image: -o-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); background-image: linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0)); -webkit-transition: background-color .2s ease-out; -moz-transition: background-color .2s ease-out; -ms-transition: background-color .2s ease-out; -o-transition: background-color .2s ease-out; transition: background-color .2s ease-out; background-clip: padding-box; /* Fix bleeding */ -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset; box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset; text-shadow: 0 1px 0 rgba(255,255,255, .9); -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
.button:hover{ background-color: #eee; color: #555;
}
.button:active{ background: #e9e9e9; position: relative; top: 1px; text-shadow: none; -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset; box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
}
.button[disabled], .button[disabled]:hover, .button[disabled]:active{ border-color: #eaeaea; background: #fafafa; cursor: default; position: static; color: #999; /* Usually, !important should be avoided but here it's really needed :) */ -moz-box-shadow: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; text-shadow: none !important;
}
/* Smaller buttons styles */
.button.small{ padding: 4px 12px;
}
/* Larger buttons styles */
.button.large{ padding: 12px 30px; text-transform: uppercase;
}
.button.large:active{ top: 2px;
}
/* Colored buttons styles */
.button.green, .button.red, .button.blue { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.2); background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,.3)), to(rgba(255,255,255,0))); background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0)); background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
}
/* */
.button.green{ background-color: #57a957; border-color: #57a957;
}
.button.green:hover{ background-color: #62c462;
}
.button.green:active{ background: #57a957;
}
/* */
.button.red{ background-color: #ca3535; border-color: #c43c35;
}
.button.red:hover{ background-color: #ee5f5b;
}
.button.red:active{ background: #c43c35;
}
/* */
.button.blue{ background-color: #269CE9; border-color: #269CE9;
}
.button.blue:hover{ background-color: #70B9E8;
}
.button.blue:active{ background: #269CE9;
}
/* */
.green[disabled], .green[disabled]:hover, .green[disabled]:active{ border-color: #57A957; background: #57A957; color: #D2FFD2;
}
.red[disabled], .red[disabled]:hover, .red[disabled]:active{ border-color: #C43C35; background: #C43C35; color: #FFD3D3;
}
.blue[disabled], .blue[disabled]:hover, .blue[disabled]:active{ border-color: #269CE9; background: #269CE9; color: #93D5FF;
}
/* Group buttons */
.button-group,
.button-group li{ display: inline-block; *display: inline; zoom: 1;
}
.button-group{ font-size: 0; /* Inline block elements gap - fix */ margin: 0; padding: 0; background: rgba(0, 0, 0, .1); border-bottom: 1px solid rgba(0, 0, 0, .1); padding: 7px; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px;
}
.button-group li{ margin-right: -1px; /* Overlap each right button border */
}
.button-group .button{ font-size: 13px; /* Set the font size, different from inherited 0 */ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
}
.button-group .button:active{ -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset; -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset; box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
}
.button-group li:first-child .button{ -moz-border-radius: 3px 0 0 3px; -webkit-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px;
}
.button-group li:first-child .button:active{ -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset; -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset; box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
}
.button-group li:last-child .button{ -moz-border-radius: 0 3px 3px 0; -webkit-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0;
}
.button-group li:last-child .button:active{ -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset; -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset; box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset;
}
![CSS3 Buttons - Script Codes](http://shots.codepen.io/ben_jammin/pen/syaCq-512.jpg)
Developer | Benjamin |
Username | ben_jammin |
Uploaded | February 02, 2023 |
Rating | 3 |
Size | 4,425 Kb |
Views | 2,024 |
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!
Name | Size |
Reset | 7,385 Kb |
Vertical Rhythm | 5,457 Kb |
Mixitup | 1,644 Kb |
Button | 0 Kb |
3D Animated Buttons | 4,132 Kb |
Free css icon set v2 - one div | 0 Kb |
Free css icon set - one div | 0 Kb |
Free css icon set v3 - one div | 0 Kb |
CSS3 Buttons | 4,425 Kb |
Menu Bar | 6,795 Kb |
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!
Name | Username | Size |
Get third wednesday | Wojtek1150 | 2,691 Kb |
Lightrays v2 | Sinthetyc | 2,903 Kb |
Brian The CSS Bee | Jonitrythall | 3,922 Kb |
Popup Modal | Aldlevine | 3,696 Kb |
AngularJS Datalist Directive | M-e-conroy | 2,366 Kb |
Apple website | Jds317 | 1,835 Kb |
Wikipedia Viewer | Codinger | 4,681 Kb |
HTML5 Video Autoplay | Zivcos | 1,352 Kb |
Sketchy Box | Mnicpt | 3,033 Kb |
Toggle menu | Seyedi | 2,279 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!