Przeanalizuj i zrozum kod:
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<title>Selektory CSS</title>
<style>
* {color: grey;}
div { font-family: Arial, sans-serif;
margin: 10px;
padding: 20px;
border-radius: 8px;
border: 1px solid #ccc;}
.box { background-color: lightgrey;}
.strong { font-weight: bold;}
#box1 { background-color: pink;}
article > div > .strong { background-color: lightyellow;}
article > #box4 { color: red;}
#box5 + #box6 { background-color: lightblue;}
#box7:last-child { background-color: lightgreen;}
</style>
</head>
<body>
<article>
<div class="box" id="box1">Div 1</div>
<div class="box">Div 2</div>
<div>
<div class="box strong">Div 3</div>
</div>
<div class="box" id="box4">Div 4</div>
</article>
<div class="box strong" id="box5">Div 5</div>
<div class="box" id="box6">Div 6</div>
<div class="box" id="box7">Div 7</div>
</body>
</html>Bez modyfikowania kodu HTML i CSS a jedynie dodając nowy kod CSS spraw, żeby biały div zawierający żółtego diva był niewidoczny (żółty ma wyglądać tak jak pozostałe).
Twój komentarz