Сместим мяч в центр при помощи left/top=50%
, а затем приподымем его указанием margin
:
#ball {
position: absolute;
left: 50%;
top: 50%;
margin-left: -20px;
margin-top: -20px;
}
Сместим мяч в центр при помощи left/top=50%
, а затем приподымем его указанием margin
:
#ball {
position: absolute;
left: 50%;
top: 50%;
margin-left: -20px;
margin-top: -20px;
}