Not
ナビゲーションに移動
検索に移動
<html> <head> <style> .box { background-color: red; } .box:not(#box1) { background-color: blue; } </style> </head> <body> <div id="box1" class="box">box1</div> <div id="box2" class="box">box2</div> <div id="box3" class="box">box3</div> </body>