JSFiddle - React, Tailwind, and code Playground

by Tìm ở đây Khoá học CNTT

HTML

<h2>General Sibling Selector</h2>
<p>General sibling selector (~) chọn tất cả các phần tử là anh/chị/em của một phần tử được chỉ định.</p>

<p>Đoạn 1.</p>

<div>
  <p>Đoạn 2.</p>
</div>

<p>Đoạn 3.</p>
<code>Some code.</code>
<p>Đoạn 4.</p>

CSS

div ~ p {
  background-color: yellow;
}