jQuery焦点图左右滚动淡进淡出特效



86 341 114



特效描述:jQuery 焦点图左右滚动 淡进淡出特效,jQuery焦点图左右滚动淡进淡出特效

代码结构

1. 引入CSS

<link rel="stylesheet" href="css/slide.css">

2. 引入JS

<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/slide.js"></script>

3. HTML代码

<div class="menu">
	<p class="menuc">
		<span></span>
		<a class="cur" href="index.html">1、默认(淡入淡出)</a>
		<a href="index2.html">2、左右滚动</a>
		<a href="index3.html">3、自动播放</a>
	</p>
</div>
<div class="main">
	<div class="mianc">
		<h1>默认(淡入淡出)</h1>
		<!-- Demo start -->
		<!-- css -->
		<style>
		.ck-slide { width: 700px; height: 320px; margin: 0 auto;}
		.ck-slide ul.ck-slide-wrapper { height: 320px;}
		</style>
		<!-- html -->
		<div class="ck-slide">
			<ul class="ck-slide-wrapper">
				<li>
					<a href="http://www.51qianduan.com//"><img src="images/1.jpg" alt=""></a>
				</li>
				<li style="display:none">
					<a href="http://www.51qianduan.com//144.html"><img src="images/2.jpg" alt=""></a>
				</li>
				<li style="display:none">
					<a href="javascript:"><img src="images/3.jpg" alt=""></a>
				</li>
				<li style="display:none">
					<a href="javascript:"><img src="images/4.jpg" alt=""></a>
				</li>
				<li style="display:none">
					<a href="javascript:"><img src="images/5.jpg" alt=""></a>
				</li>
			</ul>
			<a href="javascript:" class="ctrl-slide ck-prev">上一张</a> <a href="javascript:" class="ctrl-slide ck-next">下一张</a>
			<div class="ck-slidebox">
				<div class="slideWrap">
					<ul class="dot-wrap">
						<li class="current"><em>1</em></li>
						<li><em>2</em></li>
						<li><em>3</em></li>
						<li><em>4</em></li>
						<li><em>5</em></li>
					</ul>
				</div>
			</div>
		</div>
		<!-- js -->
		<script>
			$('.ck-slide').ckSlide();
		</script>
		<!-- Demo end -->
		</div>
	</div>
</div>
<style>
* { margin: 0; padding: 0;}
html, body { height: 100%; overflow: hidden;}
body { font-family: Consolas,arial,"宋体";}
.menu { position: absolute; left: 0; top: 0; width: 200px; height: 100%; background-color: #ccc; font-family: Consolas,arial,"宋体";}
.menuc { height: 100%; overflow-x: hidden; overflow-y: auto;}
.menu span { display: block; height: 100px;}
.menu a { display: block; height: 40px; margin: 0 0 1px 2px; padding-left: 10px; line-height: 40px; font-size: 14px; color: #333; text-decoration: none;}
.menu a:hover { background-color: #eee;}
.menu .cur { color: #000; background-color: #fff !important;}
.main { height: 100%; margin-left: 200px;}
.mianc { position: relative; height: 100%; overflow-x: hidden; overflow-y: auto;}
.main h1 { width: 900px; margin: 40px auto; font: 32px "Microsoft Yahei";}
.explain, .dowebok-explain { margin-top: 20px; font-size: 14px; text-align: center; color: #f50;}
.vad { margin: 50px 0 5px; font-family: Consolas,arial,宋体,sans-serif; text-align:center;}
.vad a { display: inline-block; height: 36px; line-height: 36px; margin: 0 5px; padding: 0 50px; font-size: 14px; text-align:center; color:#eee; text-decoration: none; background-color: #222;}
.vad a:hover { color: #fff; background-color: #000;}
.thead { width: 728px; height: 90px; margin: 0 auto; border-bottom: 40px solid #fff;}
.code { position: relative; margin-top: 100px; padding-top: 41px;}
.code h3 { position: absolute; top: 0; z-index: 10; width: 100px; height: 40px; font: 16px/40px "Microsoft Yahei"; text-align: center; cursor: pointer;}
.code .cur { border: 1px solid #f0f0f0; border-bottom: 1px solid #f8f8f8; background-color: #f8f8f8;}
.code .h31 { left: 0;}
.code .h32 { left: 102px;}
.code .h33 { left: 204px;}
.code .h34 { left: 306px;}
.code { width: 900px; margin-left: auto; margin-right: auto;}
pre { padding: 15px 0; border: 1px solid #f0f0f0; background-color: #f8f8f8;}
.f-dn { display: none;}
</style>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滚动 滚动切换 滑动选项卡切换 flash焦点图 自动滚动图片轮播 选项卡切换 滑动手风琴 渐隐切换 淡出淡进 切换按钮 表单 焦点图 幻灯片 图片轮播 图片淡出淡进 图片滚动 图片切换 图片轮播 选项卡自动切换 按钮控制

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到