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,但是我们经常会遇到各浏览器表现不一致的情况.基于此,某些情况我 ...
随机推荐
- ngrx/store effects 使用总结2:列表展示
第一个计数器案例:http://www.cnblogs.com/axel10/p/8589122.html 完成了计数器案例后,现在开始比较能够完整的展示angular2+开发流程的案例:在线获取用户 ...
- Longest Increasing Subsequence - LeetCode
Given an unsorted array of integers, find the length of longest increasing subsequence. For example, ...
- luogu P1345 [USACO5.4]奶牛的电信Telecowmunication
https://www.luogu.org/problemnew/show/1345 拆点,中间建流量为1的边,跑最小割 #include<cstdio> #include<queu ...
- 笔记-迎难而上之Java基础进阶7
序列化流 把对象以流的方式写入到文件中保存,叫做对象的序列化 把文件中保存的对象,以流的方式读取出来,叫做对象大反序列化 对象的序列化流_ObjectOutputtream继承自OutputStrea ...
- Java使用HttpURLConnection调用WebService(原始方法)
说明:使用Java原生的HttpURLConnection调用WebService可以免去引入SOA的框架,比如一些CXF框架等.可以使代码足够精简,比如对于一些只调用一两个接口的,这种方式是最适合的 ...
- Android 进度条对话框ProgressDialog
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...
- python tkinter GUI绘制,以及点击更新显示图片
tkinter 绘制GUI简单明了,制作一些简单的GUI足够,目前遇到的一个问题是不能同时排列显示多幅图片(目前没找到同时显示解决方法), 退而求其次,改成增加一个update按钮,每次点下按钮自动更 ...
- EasyUI+zTree实现简单的树形菜单切换
使用easyui_ztree实现简单的树形菜单切换效果 <!DOCTYPE html> <html> <head> <meta charset="U ...
- 2016.6.20 eclipse安装完毕后打开失败,显示a JDK or a JRE must be avaliable in order to run Eclispe
下载完成后,点击eclipse.exe,跳出如下错误. 按照百度的方法,修改了一下eclispe的配置文件,不仅没解决问题,结果跳出另一个新的错误: Failed to load the JNI sh ...
- 15、Spring Boot使用Druid和监控配置【从零开始学Spring Boot】
转载:http://blog.csdn.net/linxingliang/article/details/52001740目录(?)[-] 1添加Maven依赖 或jar包 2配置数据源相关信息 3 ...