css 3兄弟セレクタ

3321 ワード

/span>html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>title>
    <style type="text/css">
        div {
            border: 1px solid red;
            height: 30px;
        }
        /*
             : selector1 selector2 
            selector1~selector2 {...}
        */
        .abc~div {
            background-color: green;
        }
    style>
head>
<body>
    <div>div>
    <div class="abc">div>
    <div>div>
    <div>div>
body>
html>