2017-07-19 2 views
-1

Lorsque vol stationnaire à l'intérieur de cercle (jaune) en dehors de la frontière (hauteur et largeur) doivent être augmentées (animé) à partir du centre et le cercle (jaune) dans la position centrale à l'intérieur de la frontièreLorsque le vol stationnaire à l'intérieur du cercle (jaune) à l'extérieur de la bordure (hauteur et largeur) doit être augmenté (animé) à partir du centre et du cercle dans la même position?

{ 
 
    background-color: yellow; 
 
    border-radius: 50%; 
 
    border: 1px solid grey; 
 
    padding: 10px; 
 
} 
 

 
.circle { 
 
    position: absolute; 
 
    border: 5px solid #000; 
 
    border-radius: 50%; 
 
    width: 40px; 
 
    height: 40px; 
 
    transition: width 0.5s, height 0.5s; 
 
} 
 

 
.circle:hover { 
 
    width: 60px; 
 
    height: 60px; 
 
}
<div class="circle"> 
 
    <span><a><i class="icon_social fa fa-facebook-square"></i></a></span> 
 
</div>

Répondre

0

vous pouvez écrire un fichier CSS-à-dire


 

 
html { 
 
    -moz-box-sizing: border-box; 
 
    -webkit-box-sizing: border-box; 
 
    box-sizing: border-box; 
 
} 
 
*, *:before, *:after { 
 
    -moz-box-sizing: inherit; 
 
    -webkit-box-sizing: inherit; 
 
    box-sizing: inherit; 
 
} 
 
.circle { 
 
    border-radius: 50%; 
 
    height: 40px; 
 
    margin-top: 20px; 
 
    position: relative; 
 
    transition: all 0.5s ease 0s; 
 
    width: 40px; 
 
} 
 
.circle::before { 
 
    border: 4px solid #000; 
 
    border-radius: 50%; 
 
    bottom: 0; 
 
    content: ""; 
 
    height: 100%; 
 
    left: 0; 
 
    margin: auto; 
 
    position: absolute; 
 
    right: 0; 
 
    top: 0; 
 
    -webkit-transition: all 0.5s ease 0s; 
 
    transition: all 0.5s ease 0s; 
 
    width: 100%; 
 
} 
 
.circle:hover::before { 
 
    -webkit-transform: scale(1.2); 
 
    transform: scale(1.2); 
 
} 
 
.circle span { 
 
    display: block; 
 
    height: 100%; 
 
    text-align: center; 
 
    vertical-align: middle; 
 
    width: 100%; 
 
} 
 
.circle a { 
 
    left: 50%; 
 
    margin: auto; 
 
    position: absolute; 
 
    text-align: center; 
 
    top: 50%; 
 
    transform: translate(-50%, -50%); 
 
} 
 
i { 
 
    background-color: yellow; 
 
    border: 1px solid grey; 
 
    border-radius: 50%; 
 
    display: block; 
 
    padding: 10px; 
 
    text-align: center; 
 
    vertical-align: middle; 
 
}
<div class="circle"> 
 
    <span><a><i class="icon_social fa fa-facebook-square"></i></a></span> 
 
</div>

0

Cela peut vous aider ..!

* {box-sizing: border-box;} 
 
.holder {position: relative; display: inline-block; padding: 10px; border-radius: 50%; margin: 100px;} 
 
.circle {position: absolute; top: 0px; left: 0px; border: solid 5px #000; width: 100%; height: 100%; border-radius: 50%; transition: all 0.3s ease;} 
 
i {background: yellow; padding: 10px; border-radius: 50%;} 
 
.circle:hover {transform: scale(1.2);}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/> 
 
<div class="holder"> 
 
\t <i class="fa fa-facebook-square"></i> 
 
\t <div class="circle"></div> 
 
</div>