Хочу чтобы по клику показало 4 блока.
window.onload = function() {
document.getElementsByClassName('container').onclick = function() {
document.getElementsByClassName('boxes').style.display = 'block';
};
}
body {
background: #50c878;
display: flex;
justify-content: center;
align-items: center;
}
.container {
height: 150px;
width: 150px;
margin: 230px;
background: pink;
border: 2px solid grey;
border-radius: 50%;
transition: all 0.5s ease;
cursor: pointer;
position: relative;
display: flex;
justify-content: center;
align-items: center;
box-shadow: inset 2px 2px 15px 1px rgba(0, 0, 0, 0.2);
}
.container:hover {
width: 200px;
height: 200px;
color: black;
box-shadow: inset 2px 2px 100px 1px rgba(0, 0, 0, 0.4);
}
.container:hover::after {
content: attr(data-title);
position: absolute;
font-size: 35px;
}
.boxes {
width: 150px;
height: 150px;
background: #c39797;
border-radius: 50%;
border: 1px solid white;
display: flex;
justify-content: center;
align-items: center;
box-shadow: inset 5px 5px 10px 1px rgba(255, 0, 255, 0.3);
display: none;
}
.box1 {
position: absolute;
top: 20px;
left: 20px;
}
.box2 {
position: absolute;
top: 20px;
right: 20px;
}
.box3 {
position: absolute;
bottom: 20px;
left: 20px;
}
.box4 {
position: absolute;
bottom: 20px;
right: 20px;
}
<div class='container' data-title="Hello!"></div>
<div class='boxes box1'>Glad to see you there!</div>
<div class='boxes box2'>What is your name?</div>
<div class='boxes box3'>What do you like?</div>
<div class='boxes box4'>Tell me :)</div>