The difference between css # And,

Source: Internet
Author: User

The difference between css # And,
The difference between css # And,

 

The difference between css # And.

14: 43 fyws category: Html/Css | 1911 views

The difference between css # And.
For example:
# Home # h3 {
Padding-top: 0;
Padding-bottom: 0;
}
. Pop # h2,. pop # h3 {
Position: static;
Background: none;
Border-width: 0;
Width: auto;
}
What is the difference between # And .?

Share to: # qunxiong hegemony, the team needs you! # Adoption by the questioner

Use # defined css to reference it with id = "home"
Css defined with. should be referenced with class = "pop"

As shown below
# Home # h3 indicates the elements whose id is h3 in the webpage element whose id is home
Reference
{
Padding-top: 0;
Padding-bottom: 0;
}
Style

<Div id = "home">
<Div id = "h3"> This div uses the # home # h3 style </div>
</Div>

<Div class = "pop>
<Div id = "h2"> This div uses the. pop # h2 style </div>
</Div>

<Div class = "pop>
<Div id = "h3"> This div uses. pop # h3 style </div>
</Div>

. Pop # h2 and. pop # h3 are the same

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.