通用兄弟选择器,选择具有相同父元素且同级的element1之后的element2
注意:两种元素必须拥有相同的父元素,但是 element2 不必直接紧随 element1。
element1 ~ element2
{
    CSS 样式;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>鱼C-零基础入门学习Web(Html5+Css3)</title>
    <style>
        p~div{
            color: green;
        }
    </style>
</head>
<body>
   <div>
       <h1 class="important">Welcome to FishC.com</h1>
   </div>
   <div>
       <p>Welcome to FishC.com</p>
   </div>
   <p>Welcome to FishC.com</p>
   <div>
       <p >Welcome to FishC.com</p>
   </div>
   <p>Welcome to FishC.com</p>
</body>
</html>
Welcome to FishC.com
Welcome to FishC.com
Welcome to FishC.com
Welcome to FishC.com
表格中的数字表示支持该属性的第一个浏览器版本号。
| Safari | Chrome | FireFox | IE | 
| 1.0 | 1.0 | 1.0 | 5.0 |