Traffic signal
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="practice.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Practice</title>
</head>
<body>
<div id="outer">
<div class="in" id="red"></div>
<div class="in" id="yellow"></div>
<div class="in" id="green"></div>
</div>
</body>
</html>
CSS
#outer{
height: 200px;
width: 70px;
border: 2px;
border-style: solid;
}
.in{
height: 50px;
width: 50px;
border: 2px solid black;
margin: 10px;
border-radius: 50%;
}
#red{
background-color: red;
}
#yellow{
background-color: yellow;
}
#green{
background-color: green;
}
Comments
Post a Comment