-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path04_example.html
34 lines (25 loc) · 900 Bytes
/
04_example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!-- 4. General sibling combinator( ~ ) -->
<!DOCTYPE html>
<html>
<head>
<title>CSS BY EXAMPLES</title>
<style>
div ~ p{
background-color: rgb(255, 1, 174);
color: rgba(255, 255, 255, 0.75);
}
</style>
</head>
<body>
<h2>General Sibling combinator </h2>
<p>The general sibling combinator (~) selects all elements that are next siblings of a specified element.</p>
<p>Paragraph 1.</p>
<div>
<p>Paragraph 2.</p>
</div>
<p>sibling 1 of div</p>
<code>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nulla, impedit. Lorem ipsum dolor sit amet consectetur adipisicing elit. Recusandae incidunt perferendis voluptatibus. Ea odio rem deleniti voluptas repellendus veniam cumque perferendis modi aliquid? Sint aut harum, quibusdam atque quaerat officiis?</code>
<p>sibling2 of div</p>
<cong>🎉 Congratulations! you understood the concept of combinators 🎉</cong>
</body>
</html>