1. How to select all the H1, H2 ... Title?
such as Div's ID:cnblogs_post_body
The CSS I originally defined was:
1 #cnblogs_post_body H1 H2 H3 H4 2 {3 color:#FFFFFF; 4 background-color: #556b2f; 5 }
The result did not achieve the desired effect.
Later, the CSS is defined as:
1 #cnblogs_post_body H1, #cnblogs_post_body H2, #cnblogs_post_body H3, #cnblogs_post_body H4 2 {3 color:#FFFFFF; 4 background-color: #556b2f; 5 }
The effect is as follows:
H1h2h3h4
2. How to write CSS to get the following effect (rounded rectangle):
requirement : The background of the text is blue, and the rectangle is rounded, and the rectangle is required to have a shadow.
The CSS code is as follows:
#radiusRectangle { width:auto; height:30px; Border-radius:5px; background-color:#049FF1; margin:10px 0; padding:6px 20px; box-shadow: 2px 2px 6px 1px rgba (Ten, 0, 0.5)}
View Code
It is necessary to note that: Border-radius and Box-shadow are CSS3 properties and are supported only by IE9.
Box-shadow
Border-radius
CSS Problem Collection