运行代码 缩小
汉王
HTML代码
复制 格式化 注释 注释 清空
放大
AخA
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<title>仿腾讯新闻年份事件滑动效果</title>
5
<meta http-equiv="content-type" content="text/html;charset=gb2312">
6
<style type="text/css"> 
7
#itimeslide{position:relative;margin:0 20px;padding:15px 0}
8
#itimeslide #date{display:none;position:absolute;left:74px;top:3px;width:70px}
9
#itimeslide #date span{display:block;height:14px;padding:0 3px;background:#4e7db3;color:#fff;font-size:12px;line-height:14px}
10
#itimeslide #date em{display:block;width:5px;height:3px;margin:0 auto;background:url(//ku.shouce.ren/files/images/201601/56a36bdf9cf7c.gif) no-repeat -61px 0}
11
#itimeslide #timeline{overflow:visible;width:100%;height:2px;margin:16px 0 20px;background:#c7c7c7}
12
#itimeslide #timeline li{display:block;position:absolute;left:0;top:24px;width:17px;height:17px;background:url(//ku.shouce.ren/files/images/201601/56a36bdf9cf7c.gif) no-repeat 0 0;text-indent:-999px;cursor:pointer}
13
#itimeslide #timeline li.hover{background-position:-20px 0}
14
#itimeslide span#titletop{display:none;position:absolute;top:45px;width:12px;height:8px;background:url(//ku.shouce.ren/files/images/201601/56a36bdf9cf7c.gif) no-repeat -88px -21px;z-index:1}
15
#itimeslide #title{display:none;position:absolute;top:52px;padding:15px 10px;background:#f8f8ff;border:1px solid #708bab;border-radius:5px;-weblit-border-radius:5px;-moz-border-radius:5px;-webkit-box-shadow:3px 3px 3px #c7c7c7;
CSS代码
复制 格式化 注释 注释 颜色 清空
放大
CSS代码...
x
 
1
JS代码
复制 格式化 注释 注释 清空
放大
JS代码...
xxxxxxxxxx
1
 
1
名称
JavaScript 仿腾讯新闻年份事件滑动效果
分类
网站常用
描述
JavaScript 仿腾讯新闻年份事件滑动效果,具体请看代码吧,里面的注释很丰富,效果也不错。现在在腾讯新闻专题页面还可见到此效果。
收藏