How to Create a 3D Color Edge button for pure CSS3

Source: Internet
Author: User

Today, we will share a 3D button with pure CSS3, which features a colored edge, which makes the entire button more colorful and less boring. This article not only allows you to see the demo effect, but also shares the production tutorial. First, let's take a look:

.

Next, let's share the tutorial and source code. The source code of the button mainly consists of two parts: HTML and CSS. Let's take a look at the HTML code:

          Teach me to fly like Superman and woo Lois Lane      Superpowers  exp: Apr 18, 1938      80                        Teach me to play ukulele like Israel Kamakawiwo'ole      Music  exp: May 20, 1959      35                        Teach me to be a javascript ninja like Mr Doob      Web Development  exp: Apr 1, 2010      60                        Teach me to cook like The Hairy Bikers      Cooking  exp: Jul 07, 2013      100            

As you can see, the structure of the HTML code is also very clear, there is no HTML5 element, a button and several div elements.

Here we have defined four buttons. Just like above, each button has edges of different colors. Specifically, we will implement 3D effects and edge effects in CSS code.

The following is the CSS code. First, all the buttons are rendered in a uniform style:

{:;:;:;:;:;:;:;:;:;:;:;}{:;:;:;:;:;:;:;:;:;:;:;:;:;}{:;:;:;}{:;:;:;}

As you can see, the basic appearance of all buttons comes out, including 3D effects.

Then, define the edge color of each button and the style of sliding over the mouse and pressing the button:

{:;:;:;}{:;:;:;}{:;:;:;}{:;:;:;}{:;:;:;}{:;:;:;}

The main code is this, and all the source code is also shared,>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.