Home > Web Front-end > HTML Tutorial > What do these two ways of writing mean_html/css_WEB-ITnose

What do these two ways of writing mean_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:02:11
Original
1098 people have browsed it

/* 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;
}


Reply to discussion (solution)

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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template