Home >Web Front-end >HTML Tutorial >What do these two ways of writing mean_html/css_WEB-ITnose
/* Custom container */
.container-narrow {
margin: 0 auto;
max-width: 700px;
}
.container-narrow > hr {
margin: 30px 0;
}
/* Custom container */
.container-narrow {
margin: 0 auto ;
max-width: 700px ;
}
.container-narrow hr {
margin: 30px 0;
}
The inclusion selector (.container-narrow hr) selects all hr elements contained by .container-narrow elements.
The child selector (.container-narrow > hr) selects all hr elements that are child elements of the .container-narrow element.
Same effect, let me give it a try
> Only get the child elements, and spaces represent subordinate elements, including child elements, grandchild elements
Take a look at jquery For the online API, select the filtering section that is introduced.