ブラウザを復元しようとしたとき、または(サイズを変更して)divの位置が変更されました。divの元の位置を確認するには、バーをページの上部までスクロールする必要があります。下にスクロールすると、divが上に移動します.. 1 つ、すべてのケースでこの div を動かしたくありませんか? 回答をいただければ幸いです。ありがとう。
html
<div id="socialText"></div>
CSS
#socialText{
background:url(../images/....) no-repeat;
width:80px;
height:20px;
bottom:40px;
right:50px;
position:fixed;
position:absolute;
float:right;
display:none;
}
jquery
$(window).resize(function(){
$('html').css('overflow','auto');
});
$(document).ready(function(){
$('html').css('overflow','hidden');
$('#facebook')
.mouseover(function() {
$('#socialText').show().css('backgroundPosition', '0 0');
})
.mouseout(function() {
$('#socialText').hide().css('backgroundPosition', '0 25px');
})
});
$(document).ready(function(){
$('html').css('overflow','hidden');
$('#twitter')
.mouseover(function() {
$('#socialText').show().css('backgroundPosition', '0 -28px');
})
.mouseout(function() {
$('#socialText').hide().css('backgroundPosition', '0 25px');
})
});
$(document).ready(function(){
$('html').css('overflow','hidden');
$('#google')
.mouseover(function() {
$('#socialText').show().css('backgroundPosition', '0 -57px');
})
.mouseout(function() {
$('#socialText').hide().css('backgroundPosition', '0 25px');
})
});