- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Radio buttons, step 1</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"></label>
-->
</div>
<div>
<!--
<input type="radio" name="answer" id="answer2">
<label for="answer2"></label>
-->
</div>
<div>
<!--
<input type="radio" name="answer" id="answer3">
<label for="answer3"></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;
}
input[type="radio"] {
}
You’ve gone to a different page
Goalscompleted
0
- Uncomment the radio buttons and labels.
- Add the text
transparency
to the first label, - add the text
opacity
to the second one, - and finally append the text
invisibility
to the third one. - Hide the radio buttons using
display: none
.
Comments