Home > Article > Web Front-end > css3 UI modification - review
1.box-shadow property adds one or more shadows to the box.
Syntax: box-shadow: h-shadow v-shadow blur spread color inset
h-shadow is required, the position of the horizontal shadow, negative values are allowed.
v-shadow is required, the position of the vertical shadow, negative values are allowed.
blur Optional blur distance.
spread Optional, the size of the shadow.
color Optional, the color of the shadow.
inset is optional, changing the outer shadow (outset) to the content step shadow.
Example:
background: yellow; box-shadow: 4px 4px 3px #000 inset;}
Result: As shown in the figure
#2.border-radius
## The element adds a rounded border. grammar: Border-Radius: 1-4 LENGTH | % / 1-4 LENGTH | %;
Note: The order of four values is the order of four values, the upper left corner, upper right corner, lower left corner.border-radius: 2em 1em 4em / 0.5em 3em; Equivalent to: border-top-left-radius: 2em 0.5em; border-top-right-radius: 1em 3em ; border-bottom-right-radius:4em 0.5em;
border-bottom-left-radius:1em 3em; wealth in indie / 4em >> style>
.radius-test1 { width: 100px; height: 100px;
margin: 0 auto; border: 50px solid #cd0000;
50%; }
style >
3.border-image
Element border background
Used to set attributes:
border-image-source The path to the image used in the border
border-image-slice image border Inward offset
Border-image-width The width of the image border
Border-image-outset The amount of the border image area beyond the border
Border-image-repeat Whether the image border is tiled (repeated)
Rounded or stretched by default.
The border divides border-image into 9 parts: border-top-image, border-right-image
border-bottom-image, border-left-image, border-top-left-image
Border-bottom-right-image located in the four positive directions has no display effect and will not be tiled... Example:
< p class="border_image"> Result: as shown Example: (tiled round)
}
repeat;}
gradient Gradient Divided into linear-gradient (linear gradient) and radial-gradient (radial gradient)
linear-gradient
Syntax background: -webkit-linear-gradient(top,#ccc,#000); Parameters: There are three parameters in total. The first parameter represents the direction of the linear gradient, top is from top to bottom,
left means from left to right. If it is defined as left top, it means from the upper left corner to the lower right corner.
The second and third parameters are the starting point color and the end point color respectively.
Example:
:You can fill in the angle
red 50px, yellow 200px);}gradient radial gradient.
cred legend_> style>
.gradient{width:300px; height: 180px;
>
Result: as shown
Example: The use of keywords at different sizes.
,green,yellow ,black);}
Result: As shown in the figure
:25px;
overflow:hidden;border:1px
solid #000;}
.box{width:400px;height:30px;
background:-webkit-repeating-
green 10px,#fff 10px,#fff 20px); transition:3s;}
.wrap:hover .box{ margin- left:-10 0px; }
6.background-clip
Specify the drawing area of the background
Value: border-box The background is clipped to the border box
The padding-box background is clipped Cropped to the padding box
content-box The background is clipped to the content box
no-clip: Crop the background outward from the border area.
Example:
x solid #92b901;}