Practice listening for and handling JavaScript DOM Events
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
stoplight-event-exercise/index.css

49 lines
653 B

body {
display: flex;
}
#controls {
margin-top: 30px;
}
.button {
background-color: gray;
border-radius: 15px;
color: white;
cursor: pointer;
font-size: 2em;
font-weight: bold;
margin: 90px 40px;
padding: 20px;
text-align: center;
}
#traffic-light {
background-color: #ababab;
border-radius: 40px;
margin: 30px 0;
height: 550px;
padding: 20px;
width: 200px;
}
.bulb {
background-color: #111;
border-radius: 50%;
margin: 25px auto;
height: 150px;
transition: background 300ms;
width: 150px;
}
.stop {
background-color: red;
}
.slow {
background-color: orange;
}
.go {
background-color: green;
}