한 div 위로 마우스를 이동하면 숨겨진 전단 (facebook, google +, twitter) div를 표시하는 방법을 알아 내려고합니다. http://www.gethyapp.com/jquery를 사용하여 mouseover에서 소셜 공유 버튼 div를 표시하거나 숨기는 방법
내가 무슨 짓을 참조하십시오 :
상단 오른쪽에 공유 라운드 사업부의 예 애니메이션으로 이것을 가지고 여기 http://goo.gl/6XDM8
것은 내가 코드에서 무엇을했는지 있습니다 :
HTML
<div class="share">share
<div class="line"></div>
<div class="facebook">fb</div>
<div class="google-plus">g+</div>
<div class="twitter">t</div>
</div>
CSS
.share{
background-color: #DA251D;
width: 50px;
height: 50px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
position: relative;
}
.share .facebook,
.share .google-plus,
.share .twitter,
.share .line {
display:none;
}
.facebook{
background-color: #FFFF00;
width: 0px;
height: 0px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
opacity: 0;
}
.google-plus{
background-color: #FFFF00;
width: 0px;
height: 0px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
opacity: 0;
}
.twitter{
background-color: #FFFF00;
width: 0px;
height: 0px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
opacity: 0;
}
.line{
width: 1px;
height: 200px;
background-color: #000;
position: absolute;
left: 30px;
}
01 23,516,
JS
$(function(){
$(".share").hover(function(){
$(this).find(".line").delay(50).fadeIn().animate({width: 1, height: 200, opacity: 1, top:10},200);
$(this).find(".facebook").delay(100).fadeIn().animate({width: 32, height: 32, opacity: 1},400);
$(this).find(".google-plus").delay(300).fadeIn().animate({width: 32, height: 32, opacity: 1},400);
$(this).find(".twitter").delay(500).fadeIn().animate({width: 32, height: 32, opacity: 1},400);
}, function(){
$(this).find(".line").delay(50).fadeIn().animate({width: 1, height: 0, opacity: 0, top:-10},200)
$(this).find(".facebook").delay(500).animate({width: 0, height: 0, opacity: 0},400);
$(this).find(".google-plus").delay(300).animate({width: 0, height: 0, opacity: 0},400);
$(this).find(".twitter").delay(100).animate({width: 0, height: 0, opacity: 0},400);
});
});
난 당신이 공유 상자 위에 마우스를 할 때 너무 다른 전단 상자가 옆에 표시 할 수있는 방법
?
당신은 더 설명 할 수 있습니까? 너의 문제는 무엇인가? – ncm
귀하의 바이올린은 약간의 CSS 문제를 제외하고는 효과가있는 것 같습니다 ... 정확히 무엇을하고 싶습니까? –
on hover 이벤트에 함수를 추가하고 페이지로드시 숨겨진 div를 추가하십시오. –