JQuery 回到顶部效果
图片,CSS/HTML/JS代码都在,可以直接用了.
CSS代码
<style type="text/css">
#gs_feedback_gotop
{
_display: none;
}
#gs_feedback_gotop .side_fixed
{
position: fixed;
right: 20px;
bottom: 40px;
z-index: 250;
}
#gs_feedback_gotop .to_top
{
position: relative;
display: block;
width: 35px;
height: 0;
margin-left: -8px;
margin-bottom: 2px;
padding-top: 35px;
background: url(/image/go-top.png) no-repeat;
overflow: hidden;
cursor: pointer;
z-index: 2;
visibility: hidden;
}
#gs_feedback_gotop .to_top:hover
{
background-position: -36px 0;
}
#gs_feedback_gotop .c_fq, #gs_feedback_gotop .c_qs, #gs_feedback_gotop .c_os
{
display: block;
width: 35px;
height: 0;
margin-left: -8px;
padding-top: 35px;
overflow: hidden;
cursor: pointer;
z-index: 2;
margin-bottom: 2px;
position: relative;
background: url(../img/global/go-top.png) no-repeat;
}
#gs_feedback_gotop .c_fq
{
background-position: 0 -38px;
}
#gs_feedback_gotop .c_fq:hover
{
background-position: -36px -38px;
}
#gs_feedback_gotop .c_qs
{
background-position: 0 -76px;
}
#gs_feedback_gotop .c_qs:hover
{
background-position: -36px -76px;
}
</style>
HTML代码
<div id="gs_feedback_gotop">
<div class="side_fixed">
<a class="to_top" title="回到顶端" href="#top" id="gotop2" style="visibility: visible;
display: block;"> </a>
</div>
</div>
JavaScript代码
$(document).ready(function () {
$(window).scroll(function () {
if ($(document).scrollTop() >= 200) {
$('#gotop2').css('visibility', 'visible');
} else {
$('#gotop2').css('visibility', 'hidden');
}
});

JQuery 回到顶部效果的更多相关文章
- Jquery回到顶部效果
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> &l ...
- jquery实现"跳到底部","回到顶部"效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- JS实现回到顶部效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 用Javascript实现回到顶部效果
用Javascript实现回到顶部效果 经常看到网页中有回到顶部的效果,今天也研究一下回到顶部有哪些方法.众所周知,用锚链接是实现回到最简单的方法,但是从用户体验效果来说,并不是最好的.(锚链接回到顶 ...
- javascript 特效实现(2)——回到顶部效果
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- jQuery回到顶部
jquery回到顶部 <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset=& ...
- 页面滚动事件和利用JS实现回到顶部效果
页面滚动 事件:window.onscroll, 获得页面滚动位置:document.body.scrollTop: HTML代码: 这里注意此处逻辑,大于500就显示,否则就隐藏,还有注意如果变量名 ...
- jQuery写toTop(回到顶部)效果
在通常的网站开发中,页面有时候会很长,尤其是一些电商网站,为了提高用户的体验效果,我们通常会增加一个回到顶部的按钮,这个按钮我们同城会使用fixed定位,将其定位在当前可视区域某一固定位置.这个效果用 ...
- 自写jquery网页回到顶部效果,渐隐图标,引用js文件就可以
唔.进来开发需求,当网页内容草鸡多的时候,用户就须要有个button高速回到顶部,而不是自己去滚滑轮~ 原本以为比較难的说,由于上头要求所实用js来实现,哪个页面引用,哪个页面显示. 于是乎,本屌丝就 ...
随机推荐
- Bootstrap页面布局5 - 响应式布局(格式)
旨在优化不同上网设备中页面显示的优化 响应式布局:就是根据浏览窗口的尺寸,改变页面的变化 原理:利用css的media-queries判断浏览窗口的尺寸,在CSS样式表中设置一些规则! 例如: 在&l ...
- nignx的proxy_cache
http段配置: #cache configclient_body_buffer_size 512k;proxy_connect_timeout 5;proxy_read_timeout 60;pro ...
- 图解SQL多表关联查询
图解SQL多表关联查询 网上看了篇文章关于多表连接的,感觉很好,记录下来,以便日后自己学习 内连接 左连接 右连接 全外连接 1. 查两表关联列相等的数据 ...
- 【微信开发之问题集锦】redirect_uri 参数错误
问题答案:看看网页授权域名是不是以"http://",是则去掉.(如果网页授权域名都没修改,那就去修改吧,要注意域名不要带"http://"."htt ...
- freemarker 自定义标签
1.编写标签类 package com.pccw.business.fnd.common.filegen; import java.io.IOException; import java.io.Wri ...
- centos常用命令
应用程序->附件->终端 一:使用CentOS常用命令查看cpumore /proc/cpuinfo | grep "model name" grep " ...
- JS懒加载
4.如何使用js懒加载图片 a.懒加载图片是基于jquery.js的,所以: <script src="jquery.js" type="text/ja ...
- java的Random
首先,Point类 public class Point { int x, y; public Point(int x, int y) { this.x = x; this.y = y; } bool ...
- QFile文件操作-QT
#include <QCoreApplication> #include<QFile> #include<QString> #include<QDebug&g ...
- echarts -01 入门
1.效果图 2. code <!DOCTYPE html> <html lang="en"> <head> <meta charset=& ...