-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67bbe2a
commit 73cb46e
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,69 @@ | ||
|
||
/* General Styles */ | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
padding: 20px; | ||
} | ||
|
||
h1, h2 { | ||
color: #333; | ||
} | ||
|
||
section { | ||
border: 1px solid #ddd; | ||
padding: 15px; | ||
margin-bottom: 20px; | ||
background-color: #fff; | ||
} | ||
|
||
/* 1. Descendant Selector (styles all list items within the div "tree") */ | ||
.tree ul li { | ||
color: green; | ||
font-weight: bold; | ||
} | ||
|
||
/* 2. Child Selector (styles only direct children of "complex") */ | ||
.complex > p { | ||
color: blue; | ||
font-weight: bold; | ||
} | ||
|
||
/* 3. General Sibling Selector (styles all siblings of the h3 in "neighborhood") */ | ||
.neighborhood h3 ~ p { | ||
color: purple; | ||
font-style: italic; | ||
} | ||
|
||
/* 4. Adjacent Sibling Selector (styles the paragraph directly after h3) */ | ||
.alleyway h3 + p { | ||
color: orange; | ||
font-weight: bold; | ||
} | ||
|
||
/* 5. Pseudo Classes */ | ||
.playground a:hover { | ||
color: red; | ||
text-decoration: underline; | ||
} | ||
|
||
.playground button:active { | ||
background-color: #333; | ||
color: white; | ||
} | ||
|
||
/* 6. Pseudo Elements */ | ||
.newspaper p::first-line { | ||
font-weight: bold; | ||
color: darkblue; | ||
} | ||
|
||
.newspaper p::first-letter { | ||
font-size: 2em; | ||
color: darkred; | ||
} | ||
|
||
/* Extras */ | ||
a:visited { | ||
color: darkgray; | ||
} |