css jquery 实现轮播效果
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Css3 Images Fade & Slider</title>
<style type="text/css">
body{background:#f8f8f8; margin:;}
img{border:; vertical-align:middle;}
.focus{width:800px; margin:0 auto; position:relative; overflow:hidden;}
.images{height:350px; overflow:hidden; position:relative;}
.images .item{position:absolute; top:; left:; height:350px; overflow:hidden; opacity:; transition:opacity 0.8s linear; -webkit-transition:opacity 0.8s linear;}
.images .item img{width:800px;}
.images .active{opacity:;}
.control{position:absolute; bottom:10px; width:100%; text-align:center;}
.control span{display:inline-block; cursor:pointer; background:#5fbab1; color:#fff; width:25px; height:25px; text-align:center; line-height:25px; border-radius:25px; margin:0 8px;}
.control span.active{background:#e77918;}
.title{position:absolute; left:; top:30%; width:100%;}
.title p{position:absolute; left:; top:; background:#000; background:rgba(0,0,0,0.8); color:#fff; padding:20px 0; margin:; text-indent:10px; width:300px; opacity:; transform:translateX(-300px); -webkit-transform:translateX(-300px); transition:all 0.8s ease-out; -webkit-transition:all 0.8s ease-out;}
.title p.active{opacity:; transform:translateX(0); -webkit-transform:translateX(0);}
</style>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(function(){
$('.images .item:first, .control span:first, .title p:first').addClass('active');
var index = 0,
len = $('.images .item').length;
autoPlay = function(){
$('.images .item').eq(index++).addClass('active').siblings('.item').removeClass('active');
$('.title p').eq(index-1).addClass('active').siblings('p').removeClass('active');
$('.control span').eq(index-1).addClass('active').siblings('span').removeClass('active');
if(index == len){index = 0;}
},
loop = setInterval(autoPlay,3000);
$('.control span').hover(function(){
index = $(this).index();
autoPlay();
clearInterval(loop);
},function(){
loop = setInterval(autoPlay,3000);
})
})
</script>
</head> <body>
<div class="focus">
<div class="images">
<div class="item"><img src="http://d.lanrentuku.com/down/js/jiaodiantu-1041/images/banner_01.jpg" /></div>
<div class="item"><img src="http://d.lanrentuku.com/down/js/jiaodiantu-1041/images/banner_02.jpg" /></div>
<div class="item"><img src="http://d.lanrentuku.com/down/js/jiaodiantu-1041/images/banner_03.jpg" /></div>
</div>
<div class="title">
<p>不变的安全才是最可靠的安全。</p>
<p>清新的绿色源自身边的绿色。</p>
<p>服务于生活的科技才是最高端的科技。</p>
</div>
<div class="control">
<span>1</span>
<span>2</span>
<span>3</span>
</div>
</div>
</body>
</html>
css jquery 实现轮播效果的更多相关文章
- CSS+jQuery实现轮播
CSS+jQuery实现轮播 CSS jQuery 前端 实现功能: 自动轮播: 鼠标放在上面停止轮播: 鼠标放在上面显示左右切换的按钮: 鼠标放在小圆圈上显示对应的图片: 轮播效果图 style. ...
- jQuery实现轮播效果(一) - 基础
前戏: XXXX年XX月XX日,经理交给我一个站点新闻资讯网页开发的活儿.我一个java程序猿,怎么完毕得了网页设计这样高端的活儿呢! 之前尽管有学过一点HTML.CSS的知识.可是在实际的使用中,把 ...
- jquery图片轮播效果(unslider)
今天做网站(住建局网站)需要用到图片轮播,刚开始想借鉴DTCMS上的,查看CSS与页面代码,呵呵,不复杂,直接复制过来,结果调整半天,页面还是各种乱,没办法,网上找一个吧,于是找到了今天要说的这货un ...
- 通过jQuery实现轮播效果
HTML <div class="wrap"> <div id="slide"> <ul class="list&quo ...
- 用CSS实现新闻轮播效果
CSS: /* Make it a marquee */ .marquee { width: 450px;margin: 0 auto;overflow: hidden;white-space: no ...
- 12款经典的白富美型—jquery图片轮播插件—前端开发必备
图片轮播是网站中的常用功能,用于在有限的网页空间内展示一组产品图片或者照片,同时还有非常吸引人的动画效果.本文向大家推荐12款实用的 jQuery 图片轮播效果插件,帮助你在你的项目中加入一些效果精美 ...
- jQuery个性化图片轮播效果
jQuery个性化图片轮播效果 购物产品展示:图片轮播器<效果如下所示> 思路说明: 每隔一段时间,实现图片的自动切换及选项卡选中效果,鼠标划入图片动画停止,划出或离开动画开始 两个区域: ...
- JQuery实现图片轮播效果源码
======================整体结构======================== <div class="banner"> <ul class ...
- 史上最全的CSS hack方式一览 jQuery 图片轮播的代码分离 JQuery中的动画 C#中Trim()、TrimStart()、TrimEnd()的用法 marquee 标签的使用详情 js鼠标事件 js添加遮罩层 页面上通过地址栏传值时出现乱码的两种解决方法 ref和out的区别在c#中 总结
史上最全的CSS hack方式一览 2013年09月28日 15:57:08 阅读数:175473 做前端多年,虽然不是经常需要hack,但是我们经常会遇到各浏览器表现不一致的情况.基于此,某些情况我 ...
随机推荐
- (11)centos之vim使用
ZZ 保存并退出 :x 保存并退出 :q 不保存退出
- 给定n个数字,问能否使这些数字相加得到h【折半查找/DFS】
A Math game Time Limit: 2000/1000MS (Java/Others) Memory Limit: 256000/128000KB (Java/Others) Submit ...
- CSU 1779: 错误的算法【矩阵/模拟】
Description 有道题目是这样的: 输入一个 n 行 m 列网格,找一个格子,使得它所在的行和列中所有格子的数之和最大.如果答 案不唯一,输出任意解即可.比如,在下面的例子中,最优解是(1,3 ...
- HDU 1568 Fibonacci【求斐波那契数的前4位/递推式】
Fibonacci Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Proble ...
- Codeforces Round #454 C. Shockers【模拟/hash】
C. Shockers time limit per test 2 seconds memory limit per test 256 megabytes input standard input o ...
- ABP开发框架前后端开发系列---(3)框架的分层和文件组织
在前面随笔<ABP开发框架前后端开发系列---(2)框架的初步介绍>中,我介绍了ABP应用框架的项目组织情况,以及项目中领域层各个类代码组织,以便基于数据库应用的简化处理.本篇随笔进一步对 ...
- ELK之filebeat收集多类型日志
1.IP规划 10.0.0.33:filebeat+tomcat,filebeat收集系统日志.tomcat日志发送到logstash 10.0.0.32:logstash,将日志写入reids(in ...
- Data structure basics - Java Implementation
Stack & Queue Implementations FixedCapacityQueue package cn.edu.tsinghua.stat.mid_term; import j ...
- ElasticSearch搜索term和terms的区别
今天同事使用ES查询印地语的文章.发现查询报错,查询语句和错误信息如下: 查询语句:{ "query":{ "bool":{ ...
- 请求php文件的整个流程
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/ ...