仿照凤凰网内容推荐的文字展示条
时间:2010-05-25
来源:互联网
凤凰网http://www.ifeng.com/
使用easySlider Jquery插件。
首先需要Jquery.js和easySlider.js文件
<script type="text/javascript" charset="utf-8">
// <![CDATA[
$(document).ready(function(){
$("#slider").easySlider({
orientation: 'vertical',
auto: true
});
});
// ]]>
</script>
html
<body>
<div id="slider">
<ul>
<li>新闻信息滚动可控条</li>
<li>content here2...</li>
<li>content here3...</li>
<li>content here4...</li>
<li>content here5...</li>
<li>content here6...</li>
...
</ul>
<span id="prevId"><a href="javascript:void(0);">up</a></span>
<span id="nextId"><a href="javascript:void(0);">down</a></span>
</div>
</body>
css
@charset "gb2312";
/* CSS Document */
#slider{ width:600px;height:30px;overflow:hidden;color:#FFF; font-size:14px;background: #C00; position:relative;}
#slider ul, #slider li{
margin:0;
padding:0;
list-style:none;
}
#slider ul{ display:block; float:left; width:400px;}
#slider li{
width:400px;
overflow:hidden;
line-height:30px;
padding-left:5px;
}
span#prevId{}
span#nextId{}
#prevBtn, #nextBtn{
display:block;
width:20px;
height:10px;
position:absolute;
left:370px; top:14px; *top:22px;
}
#nextBtn{
top:26px;*top:32px;
}
#prevBtn a, #nextBtn a{
display:block;
width:12px;
height:10px;
background: url(../images/up1.png) no-repeat 0 0;
}
#prevBtn a:hover{
display:block;
width:12px;
height:10px;
background:url(../images/up.png) no-repeat 0 0;
}
#nextBtn a{
background:url(../images/down1.png) no-repeat 0 0;
}
#nextBtn a:hover{
background:url(../images/down.png) no-repeat 0 0;
}
文字展示.zip (27.12 KB)
使用easySlider Jquery插件。
首先需要Jquery.js和easySlider.js文件
<script type="text/javascript" charset="utf-8">
// <![CDATA[
$(document).ready(function(){
$("#slider").easySlider({
orientation: 'vertical',
auto: true
});
});
// ]]>
</script>
html
<body>
<div id="slider">
<ul>
<li>新闻信息滚动可控条</li>
<li>content here2...</li>
<li>content here3...</li>
<li>content here4...</li>
<li>content here5...</li>
<li>content here6...</li>
...
</ul>
<span id="prevId"><a href="javascript:void(0);">up</a></span>
<span id="nextId"><a href="javascript:void(0);">down</a></span>
</div>
</body>
css
@charset "gb2312";
/* CSS Document */
#slider{ width:600px;height:30px;overflow:hidden;color:#FFF; font-size:14px;background: #C00; position:relative;}
#slider ul, #slider li{
margin:0;
padding:0;
list-style:none;
}
#slider ul{ display:block; float:left; width:400px;}
#slider li{
width:400px;
overflow:hidden;
line-height:30px;
padding-left:5px;
}
span#prevId{}
span#nextId{}
#prevBtn, #nextBtn{
display:block;
width:20px;
height:10px;
position:absolute;
left:370px; top:14px; *top:22px;
}
#nextBtn{
top:26px;*top:32px;
}
#prevBtn a, #nextBtn a{
display:block;
width:12px;
height:10px;
background: url(../images/up1.png) no-repeat 0 0;
}
#prevBtn a:hover{
display:block;
width:12px;
height:10px;
background:url(../images/up.png) no-repeat 0 0;
}
#nextBtn a{
background:url(../images/down1.png) no-repeat 0 0;
}
#nextBtn a:hover{
background:url(../images/down.png) no-repeat 0 0;
}
附件

2010-5-25 10:21, 下载次数: 63
打包下载
作者: snono 发布时间: 2010-05-25
谢谢分享。。下载了
作者: iaw2001200 发布时间: 2010-05-25
发贴的功能还不怎么会用,自己做一下板凳吧。
作者: snono 发布时间: 2010-05-25
好像有点问题。
只要动过小三角,他就停在那儿不走了。
只要动过小三角,他就停在那儿不走了。
作者: yamanyin 发布时间: 2010-05-25
已经发过一款类似的,http://bbs.blueidea.com/thread-2980859-1-1.html,。。。
不过它不是基于任何JS库。
[ 本帖最后由 KOEN301 于 2010-5-26 10:17 编辑 ]
不过它不是基于任何JS库。
[ 本帖最后由 KOEN301 于 2010-5-26 10:17 编辑 ]
作者: KOEN301 发布时间: 2010-05-26
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28