html5 - Cleaning up CSS jitters -


i've built these circles expand border when there mouseover. problem i'm getting times circle jitter/shake. , becomes more apparent when set transition: .1s ease-in-out; more .2s.

is there work around problem or way is?

here's code in jsfiddle

thanks , help!

edit: transitioning dimensions (width , height) of circles maintain centering. realize causing jittering during transition. there work around?

i got rid of percent values top/left positioning, cleaned margins , aligned border-width of outer circle:

here demo

.box {     position: relative;     width: 220px;     height: 220px;     float: left;     margin-right: 50px; }  .clearcircle {     position: absolute;     top:15px;     left:15px;     width: 190px;     height:190px;     border-radius: 100%;     background-color: transparent;     border: 5px solid #c0392b;     transition: .2s ease-in-out; }  .clearcircle:hover {     width:220px;     height: 220px;     top: 0px;     left: 0px;     border: 5px solid #c0392b;  } .circle {     position: absolute;     top:50%;     margin-top: -100px;     left: 50%;     margin-left:-100px;     width: 200px;     height:200px;     border-radius: 100%;     background-color: #e74c3c;     overflow: hidden;     transition: .2s ease-in-out;  }   .circle p {     position:relative;     text-align: center;     top: 50%;     margin-top: -55px;     color: white;     transition: .3s; }   .circle:hover{     background-color: #e97468; } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -