I have the following:
* {
font-family: Arial, Helvetica, sans-serif;
}
.x-y-center {
display: flex !important;
justify-content: center !important;
align-items: center !important;
text-align: center !important;
}
.g {
font-size: 55px !important;
width: 100px;
height: 100px;
border-radius: 50% !important;
transition: all .2s ease-in-out;
margin: 25px 0px 25px 0px;
}
.d {
font-size: 25px !important;
transition: all .2s ease-in-out;
width: 40px;
height: 40px;
border-radius: 50% !important;
margin: 25px 0px 5px 0px;
}
.g:hover,
.d:hover {
transform: scale(1.1);
box-shadow: 10px 10px 5px #888888;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css?v=1">
<div class="container ">
<div class="g x-y-center btn btn-primary">
<b>G</b>
</div>
<div class="d x-y-center btn btn-success">
<b>D</b>
</div>
<div class="d x-y-center btn btn-success">
<b>D</b>
</div>
<div class="d x-y-center btn btn-success">
<b>D</b>
</div>
</div>
I would like to be able to achieve this:
I was trying with jquery
, but I fall into an infinity of conditionals ( if-else if-else
) validating coordinates and positions.
How can I do it in a simple and dynamic way?