CSS3 border design
CSS3 has a more powerful border design function than CSS2, including three new attributes, namely border-radius for designing rounded rectangles , box-shadow for designing shadow effects, and border-image for designing picture border effects . Using these three new CSS3 border attributes, web designers can quickly make beautiful element borders, and there is no need to use traditional Photoshop or GIMP to design these effects, except for border-image, which needs to be prepared first. In addition, almost no drawing software is used, and because these three frame design effects are really easy to use, they are supported by most mainstream browsers, such as the latest version of IE, FireFox, Chrome, Opera, Safari.. . Wait, this article will introduce the basic examples of these three CSS3 border attributes. You can enter the detailed introduction page of each attribute from each example to read.
CSS3 border design example 1. Design the border-radius property of a rounded rectangle
CSS3 border-radius rounded corner effects
</div>
Detailed introduction: CSS3 rounded border-radius .
CSS3 border design example 2: box-shadow property of design shadow effect
CSS3 box-shadow shadow effect
</div>
Detailed introduction: CSS3 box-shadow
CSS3 border design example 3. Design the border-image property of the picture border effect
div{
border:20px solid transparent;
width:330px;
padding:20px;
}
#NewImgBorder{
-moz-border-image:url(picture URL) 30 30 round; /* Show Firefox*/
-webkit-border -image:url(picture URL) 30 30 round; /* Show it to Safari and Chrome*/
-o-border-image:url(picture URL) 30 30 round; /* Show it to Opera*/
border-image:url( Image URL) 30 30 round;
}
</style>
<div id="NewImgBorder">CSS image-border attribute example</div>
Detailed introduction: CSS3 border-image property❉
Postscript
The advantages of the above three new CSS3 border design features must have been known to readers. How to apply it to web design depends on the ingenuity of the designers! Finally, if you want to get more web design technical sharing information, welcome to join our fan group.
Post a Comment
0 Comments