How to highlight CSS borders

Source: Internet
Author: User

How to highlight CSS borders
When designing a webpage, we often perform special processing on some border styles to highlight the effect. Today, I will explain how to make CSS borders shine.

There is a bright light around the input box, or the shadow creates the illusion that the border is shining. This is what I call the highlighted effect. How should we implement it?

In this case, let's start with the code. I use the maple browser and webkit kernel, so here I only write webkit

The Code is as follows:

. Aa: HOVER {

-Webkit-transition: border linear. 2 s,-webkit-box-shadow linear. 5 s;

Border-color: rgba (141, 39, 142,. 75 );

-Webkit-box-shadow: 0 0 18px rgba (111,1, 32,3 );

}

. Aa {

Height: 100px; width: 100px;

}

In this case, the function is implemented in a few words, and I will not be able to figure it out. I will analyze the key points of success based on the above results:

1. transition of transition. border linear. 2s indicates the gradual transition of the border attribute, while the subsequent transition is the gradual transition of the Shadow part;

2. rgba (a, B, c, d). We have used it many times before. The first three digits are in color, while the fourth digit is in transparency, which must be kept in mind;

3. box-shadow: x y 10px rgba (a, B, c, d). It has also been used many times before. x y is the shadow direction, then there is the shadow spreading distance, and finally the color of the Shadow part;

4. In the end, it is hover. You can write an article on pseudo elements and pseudo classes separately. But we are quite familiar with hover.

This article first: Network Teaching Base original address: http://www.studynb1.com/css/84.html

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.