- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Radio buttons, step 2</title>
<meta charset="utf-8">
<link rel="stylesheet" href="material.css">
<link rel="stylesheet" href="style.css">
</head>
<body class="yellow-theme">
<section class="card">
<h1 class="question"><span>What CSS property can you use to hide an element?</span></h1>
<form class="answers" action="https://echo.htmlacademy.ru/courses" method="post">
<button class="fab" type="submit"></button>
<div>
<input type="radio" name="answer" id="answer1">
<label for="answer1">transparency</label>
</div>
<div>
<input type="radio" name="answer" id="answer2">
<label for="answer2">opacity</label>
</div>
<div>
<input type="radio" name="answer" id="answer3">
<label for="answer3">invisibility</label>
</div>
</form>
</section>
</body>
</html>
CSS
label {
position: relative;
cursor: pointer;
}
label::before,
label::after {
position: absolute;
top: 0;
left: -42px;
border-radius: 50%;
content: "";
}
label::before {
width: 12px;
height: 12px;
border: solid 2px #5a5a5a;
}
label::after {
}
input[type="radio"] {
display: none;
}
You’ve gone to a different page
Goalscompleted
0
- For
label::after
, set a width and height of16px
- a background color of
#00bad2
, - and the
transform: scale(1.1)
transform.
Comments