<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>通用选择器</title> <link rel="stylesheet" href="../css/008.css"> </head> <body> <p>p0</p> <p class="active">p1</p> <p>p2</p> <p>p3</p> <ul> <li>p4</li> <li>p5</li> <li>p6</li> </ul> <p class="active">p7</p> <p>p8</p> </body> </html>
/*通用兄弟选择器,当前选中元素的向下的所有兄弟*/ .active~p{ background: brown ; }