Brief Tutorial
This is a cool colorful 3D button style made using CSS3 linear gradient. This set of buttons is divided into different colors, sizes and rounded corners. When using it, you only need to add the corresponding class. It is simple and practical.
How to use
HTML structure
The basic HTML structure of the button is very simple, using a hyperlink element to make it.
<a class="button large regular red" href="javascript:void(0);">Button</a>
CSS style
The general CSS style of the button is as follows.
.button { background-color: #999; background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,0%,.1)); background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,0%,.1)); background-image: -ms-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,0%,.1)); background-image: -o-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,0%,.1)); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,0%,.1)); border: none; border-radius: .5em; box-shadow: inset 0 0 0 1px hsla(0,0%,0%,.2), inset 0 2px 0 hsla(0,0%,100%,.1), inset 0 1.2em 0 hsla(0,0%,100%,0.1), inset 0 -.2em 0 hsla(0,0%,100%,.1), inset 0 -.25em 0 hsla(0,0%,0%,.25), 0 .25em .25em hsla(0,0%,0%,.05); color: #444; cursor: pointer; display: inline-block; font-family: sans-serif; font-size: 1em; font-weight: bold; line-height: 1.5; margin: 0 .5em 1em; padding: .5em 1.5em .75em; position: relative; text-decoration: none; text-shadow: 0 1px 1px hsla(0,0%,100%,.25); vertical-align: middle; } .button:hover { outline: none; } .button:hover, .button:focus { box-shadow: inset 0 0 0 1px hsla(0,0%,0%,.2), inset 0 2px 0 hsla(0,0%,100%,.1), inset 0 1.2em 0 hsla(0,0%,100%,.1), inset 0 -.2em 0 hsla(0,0%,100%,.1), inset 0 -.25em 0 hsla(0,0%,0%,.25), inset 0 0 0 3em hsla(0,0%,100%,.2), 0 .25em .25em hsla(0,0%,0%,.05); } .button:active { box-shadow: inset 0 0 0 1px hsla(0,0%,0%,.2), inset 0 2px 0 hsla(0,0%,100%,.1), inset 0 1.2em 0 hsla(0,0%,100%,.1), inset 0 0 0 3em hsla(0,0%,100%,.2), inset 0 .25em .5em hsla(0,0%,0%,.05), 0 -1px 1px hsla(0,0%,0%,.1), 0 1px 1px hsla(0,0%,100%,.25); margin-top: .25em; outline: none; padding-bottom: .5em; }
The text style on the button is as follows.
.lightText { box-shadow: inset 0 0 0 1px hsla(0,0%,0%,.25), inset 0 2px 0 hsla(0,0%,100%,.1), inset 0 1.2em 0 hsla(0,0%,100%,.05), inset 0 -.2em 0 hsla(0,0%,100%,.1), inset 0 -.25em 0 hsla(0,0%,0%,.5), 0 .25em .25em hsla(0,0%,0%,.1); color: #fff; text-shadow: 0 -1px 1px hsla(0,0%,0%,.25); } .lightText:hover, .lightText:focus { box-shadow: inset 0 0 0 1px hsla(0,0%,0%,.25), inset 0 2px 0 hsla(0,0%,100%,.1), inset 0 1.2em 0 hsla(0,0%,100%,.05), inset 0 -.2em 0 hsla(0,0%,100%,.1), inset 0 -.25em 0 hsla(0,0%,0%,.5), inset 0 0 0 3em hsla(0,0%,100%,.2), 0 .25em .25em hsla(0,0%,0%,.1); } .lightText:active { box-shadow: inset 0 0 0 1px hsla(0,0%,0%,.25), inset 0 2px 0 hsla(0,0%,100%,.1), inset 0 1.2em 0 hsla(0,0%,100%,.05), inset 0 0 0 3em hsla(0,0%,100%,.2), inset 0 .25em .5em hsla(0,0%,0%,.05), 0 -1px 1px hsla(0,0%,0%,.1), 0 1px 1px hsla(0,0%,100%,.25); }
CSS styles for various sizes, rounded corners and colors of buttons are as follows.
/* Large */ .large {font-size: 1.25em;} /* Medium */ .medium {font-size: 1em;} /* Small */ .small {font-size: .75em;} /* Regular */ .regular {border-radius: .5em;} /* Square */ .square {border-radius: .25em;} /* Round */ .round {border-radius: 1.25em;} /* Red */ .red {background-color: #ff6c6f;} /* Orange */ .orange {background-color: #f6cf6f;} /* Yellow */ .yellow {background-color: #fff6c6;} /* Green */ .green {background-color: #6fcf6f;} /* Blue */ .blue {background-color: #6fc6ff;} /* Purple */ .purple {background-color: #f6c6ff;} /* White */ .white {background-color: #eee;} /* Grey */ .grey {background-color: #999;} /* Black */ .black {background-color: #444;}
The above is the content of pure CSS3 cool color 3D button style. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!

In a perfect world, our projects would have unlimited resources and time. Our teams would begin coding with well thought out and highly refined UX designs.

Oh, the Many Ways to Make Triangular Breadcrumb Ribbons

SVG has its own set of elements, attributes and properties to the extent that inline SVG code can get long and complex. By leveraging CSS and some of the forthcoming features of the SVG 2 specification, we can reduce that code for cleaner markup.

You might not know this, but JavaScript has stealthily accumulated quite a number of observers in recent times, and Intersection Observer is a part of that

We may not need to throw out all CSS animations. Remember, it’s prefers-reduced-motion, not prefers-no-motion.

PWA (Progressive Web Apps) have been with us for some time now. Yet, each time I try explaining it to clients, the same question pops up: "Will my users be

It's extremely surprising to me that HTML has never had any way to include other HTML files within it. Nor does there seem to be anything on the horizon that

There are a lot of different ways to use SVG. Depending on which way, the tactic for recoloring that SVG in different states or conditions — :hover,


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools