1.纯Css实现轮播效果

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{margin:0;padding:0;}
#wrap{
width:520px;height:280px;
border:1px solid;overflow:hidden;
position:absolute;top:100px;left:300px;
}
.box{
width:2600px;height:280px;
position:relative;
z-index:9;
left:0;
cursor:pointer;
}
.box>li{float:left;}
.pics_list{
width:100%;height:8%;
position:absolute;bottom:0px;
background:#8B8878;opacity:0.8;filter:alpha(opacity:80);
cursor:pointer;text-align:center;
z-index:999;
}
.num{
position:absolute;z-index:10;
display:inline-block;
right:10px;bottom:0px;
border-radius:100%;
background:#f00;
width:25px;height:25px;
line-height:25px;
cursor:pointer;
color:#fff;
text-align:center;
opacity:0.8;
margin:0 10px;
} .num:hover{background:#00f;}
.num:nth-child(2){margin-right:40px}
.num:nth-child(3){margin-right:80px}
.num:nth-child(4){margin-right:120px}
.num:nth-child(5){margin-right:160px}
.num:hover,.box:hover{animation-play-state:paused;} .play{
animation: ma 10s ease-out infinite alternate;
} #a1:hover ~ .box{animation: ma1 .5s ease-out forwards;}
#a2:hover ~ .box{animation: ma2 .5s ease-out forwards;}
#a3:hover ~ .box{animation: ma3 .5s ease-out forwards;}
#a4:hover ~ .box{animation: ma4 .5s ease-out forwards;}
#a5:hover ~ .box{animation: ma5 .5s ease-out forwards;}
@keyframes ma1 {0%{left:-1200px;}100%{left:-0px;} }
@keyframes ma2 {0%{left:-1200px;}100%{left:-520px;} }
@keyframes ma3 {100%{left:-1040px;} }
@keyframes ma4 {100%{left:-1560px;} }
@keyframes ma5 {100%{left:-2120px;} } @keyframes ma {/*---每图片切换有两个阶段:位移切换和静置。中间的效果可以任意定制----*/
0%,20% { left: 0px; }
25%,40% { left: -520px; }
45%,60% { left: -1040px; }
65%,80% { left: -1560px; }
85%,100% { left: -2120px; }
}
</style>
</head>
<body>
<div id="wrap">
<a class="num" id="a1"></a>
<a class="num" id="a2"></a>
<a class="num" id="a3"></a>
<a class="num" id="a4"></a>
<a class="num" id="a5"></a>
<ul class="box play">
<li><img src="img/2.jpg" alt="" /></li>
<li><img src="img/1.jpg" alt="" /></li>
<li><img src="img/3.jpg" alt="" /></li>
<li><img src="img/4.jpg" alt="" /></li>
<li><img src="img/5.jpg" alt="" /></li>
</ul>
</div>
</body>
</html>

各种轮播实现(纯css实现+js实现)的更多相关文章

  1. 纯css、js 的H5页面对接echarts

    做项目时,会遇到一些零碎的技术点.记录下来以防忘记 需求:做可视化界面,但是需要兼容ie8,需要用纯css.js 的H5页面对接echarts,下面为效果图(带定时器循环显示tooltip). 实现方 ...

  2. 纯js轮播图练习-2,js+css旋转木马层叠轮播

    基于css3的新属性,加上js的操作,让现在js轮播图花样越来越多. 而现在出现的旋转木马层叠轮播的轮播图样式,却是得到了很多人都喜爱和投入使用. 尤其是在各大软件中,频繁的出现在大家的眼里,在web ...

  3. 纯css和js版下拉菜单

    <!doctype html> <html> <head> <meta charset="utf-8"> <title> ...

  4. 纯CSS实现JS效果研究

    利用CSS3:checked选择器和~配合实现tab切换 效果: 代码: <style> body,div,input,label{ margin:0; padding:0; } #tab ...

  5. 纯css无js实现点击事件

    <input id="A" type="checkbox"><label for="A"> <span cla ...

  6. 纯js写图片轮播插件

    最近终于写成了自己创作的图片轮播插件,使用原生js编写.与目前网上流行的轮播插件相比,功能和效果稍弱,但是使用起来相当方便. 先看html代码 <!DOCTYPE html> <ht ...

  7. js原生轮播

    js原生轮播 今天用js做了轮播图,做的不怎么好,希望大家能够看懂. 效果: 1.鼠标放在轮播图上自动停止 2.鼠标离开轮播图自动播放 3.鼠标点击轮播图上的小圆点跳转到相应的图上. 代码: < ...

  8. 原生js实现简单轮播的淡入淡出效果

    实现这种淡入淡出的轮播关键在于css的一种设置  首先它不能像传统的轮播显示隐藏 或者左右浮动 他应该让其固定定位使其重叠在一起  达到这种效果  然后设置c3动画属性 transition:1s; ...

  9. 使用原生js将轮播图组件化

    代码地址如下:http://www.demodashi.com/demo/11316.html   这是一个轮播图组件,这里是代码地址,需要传入容器的id和图片地址,支持Internet Explor ...

随机推荐

  1. git一个本地仓库连接多个远程仓库

    前言:由于公司的GIT是内网服务器,而在家工作访问不了内网服务器,由此想把本地仓库连接一个外网的GIT服务器(码云),方便不在公司时开发. 原文 某些场合,一个git项目需要能同时使用两个甚至多个远程 ...

  2. wget下载网络图片

    wget http.......  --no-check-certificate

  3. Servlet的HTTP状态码

    以下内容引用自http://wiki.jikexueyuan.com/project/servlet/http-status-codes.html: HTTP请求的格式和HTTP响应消息的格式是相似的 ...

  4. JSP中自动刷新

    以下内容引用自http://wiki.jikexueyuan.com/project/jsp/auto-refresh.html: 细想一个显示在线比赛分数.股市状态或当前交易额的网页.对于所有这种类 ...

  5. Android 原生开发、H5、React-Native使用利弊和场景技术分享

    http://m.blog.csdn.net/article/details?id=51778086 发表于2016/6/28 18:52:46  1176人阅读      最近工作中接触到React ...

  6. [React] Make Compound React Components Flexible

    Our current compound component implementation is great, but it's limited in that users cannot render ...

  7. checkstyle+ant生成checkstyle报告

    <?xml version="1.0" encoding="UTF-8" ?> <project name="tibim" ...

  8. C#编译器优化那点事 c# 如果一个对象的值为null,那么它调用扩展方法时为甚么不报错 webAPI 控制器(Controller)太多怎么办? .NET MVC项目设置包含Areas中的页面为默认启动页 (五)Net Core使用静态文件 学习ASP.NET Core Razor 编程系列八——并发处理

    C#编译器优化那点事   使用C#编写程序,给最终用户的程序,是需要使用release配置的,而release配置和debug配置,有一个关键区别,就是release的编译器优化默认是启用的.优化代码 ...

  9. Broccoli &amp; Babel使用演示样例

    1 创建项目project文件夹:test 2 在test下运行 npm init 按提示填写package.json文件 3 安装broccoli命令行工具broccoli-cli npm inst ...

  10. SpringMVC之请求参数的获取方式

    转载出处:https://www.toutiao.com/i6510822190219264516/ SpringMVC之请求参数的获取方式 常见的一个web服务,如何获取请求参数? 一般最常见的请求 ...