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