CSS ?? ???
CSS ?? ???
?? ???? ? ??? ?? ???? ??? ?????.
CSS ?? ????? ?? ???? ??? ??? ?????.
CSS3?? ? ?? ?? ??? ???? ????.
?? ???(???? ??)
?? ?? ???(?? ? ??? ??)
?? ?? ???(???? ??) ??? ?? ?? )
?? ?? ???(??? ??)
?? ?? ???
?? ?? ???? ?? ?? ??? ?? ?? ??? ?????.
?? ???? ?? p ??? ???? div ??? ?????.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> div p { background-color:yellow; } </style> </head> <body> <div> <p>段落 1。 在 div 中。</p> <p>段落 2。 在 div 中。</p> </div> <p>段落 3。不在 div 中。</p> <p>段落 4。不在 div 中。</p> </body> </html>
????? ???? ??
?? ?? ???
?? ?? ???? ????, ?? ?? ???( ???? ??? ?? ??? ??? ? ????.
?? ???? <div> ??? ?? ?? ?? ??? ?????.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> div>p { background-color:yellow; } </style> </head> <body> <h1>Welcome to My Homepage</h1> <div> <h2>My name is Donald</h2> <p>I live in Duckburg.</p> </div> <div> <span><p>I will not be styled.</p></span> </div> <p>My best friend is Mickey.</p> </body> </html>
????? ???? ??
Adjacent Sibling Selector
Adjacent Sibling Selector ?? ?? ?? ?? ?? ??? ??? ? ??? ? ? ??? ?? ??? ????.
?? ?? ?? ??? ??? ???? ?? ? ? ??? ?? ??? ?? ?? ?? ?? ???? ??? ? ????.
?? ???? <div> ?? ?? ?? ? ?? <p> ??? ?????.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> div+p { background-color:yellow; } </style> </head> <body> <h1>Welcome to My Homepage</h1> <div> <h2>My name is Donald</h2> <p>I live in Duckburg.</p> </div> <p>My best friend is Mickey.</p> <p>I will not be styled.</p> </body> </html>
????? ???? ?????
?? ?? ?? ???
?? ?? ???? ??? ??? ??? ?? ??? ?? ?????.
?? ???? ?? <div> ?? ? ?? ??? ?? ?? <p>? ?????.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> div~p { background-color:yellow; } </style> </head> <body> <div> <p>段落 1。 在 div 中。</p> <p>段落 2。 在 div 中。</p> </div> <p>段落 3。不在 div 中。</p> <p>段落 4。不在 div 中。</p> </body> </html>
????? ???? ?????