CSS Problem Collection

Source: Internet
Author: User

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

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.