返回顶部布局问题
请大神帮我看一下 我这里的返回上一页 位置固定了fixed 但是往下拖正文的时候会和正文重叠到一块。我现在就想知道如何讲这个小div 放到正文的右边 不让他们重叠? 正文是一个table
[解决办法]
那你在设计的时候,将div 设置个float属性,让他漂在正文右侧吧
[解决办法]
这个是css控制的,
<a href="#header" title="回到顶部" class="abgne_gotoheader"></a>
$(function () {
$(window).bind("scroll", function () {
//show top menu list block
if ($(this).scrollTop() >= 300){
//$(".abgne_gotoheader").fadeIn(1000);
$(".abgne_gotoheader").fadeIn(1000);
var _right=(($(document).width()-1155)/2 -50);
$(".abgne_gotoheader").css("right",_right+"px");
}else{
$(".abgne_gotoheader").hide();
}
});
});
//back top
$(function(){
$("a.abgne_gotoheader").hover(function(){
$(this).css("background","url('images/top_tip.jpg') no-repeat -50px 0");
},function(){
$(this).css("background","url('images/top_tip.jpg') no-repeat 0 0");
});
$('a.abgne_gotoheader').click(function(){
var $body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body');
$body.animate({
scrollTop: 0
}, 600);
return false;
});
});