The border of CSS

Source: Internet
Author: User

1.border-width does not support percentages

Properties: thin:1px medium:3px (default) thick:5px

2.border-style:double Double Line
Implement three horizontal lines apart
{
width:120px;height:120px;
border-top:60px Double;
border-bottom:20px solid;
}

3.border-color and color
Like both,
. add{
Color: #ccc '
Transition:color. 25s;
BORDER:1PX Solid
}
. add:hover{
Color: #06c
}
All elements can be hover color by setting color on the parent element only

4.border and background positioning
(1) Background-position default relative to the left upper position
(2) using border to achieve relative right positioning
{
border-right:50px Solid Transparent
background-position:100% 40px;
}

5.border and triangular lamp graphic construction

. a{
width:100px;
height:100px;
border:100px solid;
Border-color:red Green Blue Orange;
}

Change the width and height and border-color to achieve different shapes.

6. Achieve trapezoid

. a{
width:600px;
border:100px solid;
Border-color:transparent Transparent #c00;
}

The border of CSS

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.