先前用CSS3做了一个一张图片实现的轮播,但是这样的图片很难找,于是又改进了一下。

HTML:

<div class="box">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>

CSS:

<style>
.box{
position: relative;
width: 500px;
height: 300px;
overflow: hidden;
margin: 100px auto;
}
div ul{
position: relative;
top:;
left:;
width: 400%;
height: 100%;
overflow: hidden;
margin:;
padding:;
animation: lb 12s cubic-bezier(0.3,0.4,0.3,1) 0s infinite;
}
@keyframes lb {
0%{
left: 0%;
}
25%{
left: -100%;
}
50%{
left: -200%;
}
75%{
left: -300%;
}
100%{
left: 0%;
}
}
.box ul li{
float: left;
height: 100%;
list-style: none;
width: 25%;
}
.box ul li:nth-of-type(1){
background-color: #999;
}
.box ul li:nth-of-type(2){
background-color: #FEA;
}
.box ul li:nth-of-type(3){
background-color: #F00;
}
.box ul li:nth-of-type(4){
background-color: #000;
} </style>

原理和上次轮播差不多,让ul改变位置。轮播图片,在li里放图片即可。

CSS3实现轮播图效果2的更多相关文章

  1. CSS3实现轮播图效果

    CSS3实现轮播图主要是由css:background-position和css3:animation实现.且实现此轮播需要一张四个图横着相连的图片. 注(Internet Explorer 10.F ...

  2. css3百叶窗轮播图效果

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. 纯CSS实现轮播图效果,你不知道的CSS3黑科技

    前言 轮播图已经是一个很常见的东西,尤其是在各大App的首页顶部栏,经常会轮番显示不同的图片. 一提到轮播图如何实现时,很多人的第一反应就是使用Javascript的定时器,当然这种方法是可以实现的. ...

  4. js实现轮播图效果(附源码)--原生js的应用

    1.js实现轮播图效果 <!DOCTYPE html><html lang="en"><head> <meta charset=" ...

  5. 纯CSS3实现轮播图

    前言 纯css3实现的轮播图效果,和JavaScript控制的相比,简单高效了很多,但是功能也更加单一,只有轮播不能手动切换. 用什么实现的呢?页面布局 + animation动画 HTML部分 &l ...

  6. 高仿阴阳师官网轮播图效果的jQuery插件

    代码地址如下:http://www.demodashi.com/demo/12302.html 插件介绍 这是一个根据阴阳师官网的轮播效果所扒下来的轮播插件,主要应用于定制个性化场景,目前源码完全公开 ...

  7. css3实现轮播图

    css3动画属性简写: animation: name  duration  timing-function  delay  iteration-count  direction  fill-mode ...

  8. 用html +js+css 实现页面轮播图效果

    html 页面 <html lang="en"> <head> <meta charset="UTF-8"> <met ...

  9. JavaScript实现轮播图效果

    我又来了,同志们.老想你们了 捕获小可爱一枚. 下面进入正题:用JavaScript原生代码写轮播图效果. 具体效果就不多说了,网站上面的轮播效果我们都知晓.下面是展示代码 html代码: <d ...

随机推荐

  1. JS工作积累

    /* * YYYY-MM-DD类型的字符串日期比较 * */ String.prototype.compareAsDate=function(dateStr){//prototype原型方法 var ...

  2. 小知识:如何解压cpio.gz文件

    第一种方法: zcat xxxx.cpio.gz | cpio -idmv 第二种方法 :第一步: gunzip xxxx.cpio.gz第二步:cpio -idmv < xxxx.cpio # ...

  3. maven配置开发

    1.项目中使用Log4j对其日志进行配置管理,采取的方式一种是通过properties文件设置,另一种方式就是通过设置xml文件的配置. 使用场景: 编程模型:log.err();log.debug( ...

  4. Oracle corrupt block(坏块) 详解

    转自:http://blog.csdn.net/tianlesoftware/article/details/5024966 一. 坏块说明 1.1 相关链接 在看坏块之前,先看几个相关的链接,在后面 ...

  5. Functions类,一个Javascript的函数加法类,将两个函数加起来,顺序执行

    以下是类的代码: var Functions = { oFunctions: null, add: function (oFunc, oNewFunc) { var oNew = function ( ...

  6. The Ninth Hunan Collegiate Programming Contest (2013) Problem J

    Problem J Joking with Fermat's Last Theorem Fermat's Last Theorem: no three positive integers a, b, ...

  7. mysq 因断电而导致的错误

    问题来源: 昨天断电,而我没有保存,导致出现以下问题: 2015-10-12 10:48:10 7300 [Note] Plugin 'FEDERATED' is disabled. 2015-10- ...

  8. 【转】appium_python_API文档

    1.contextscontexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5页面的控 ...

  9. 酷我音乐API

    今天把酷我音乐API分享给大家: 歌曲搜索API:http://search.kuwo.cn/r.s?all={0}&ft=music& itemset=web_2013&cl ...

  10. 计数排序(Count Sort )与插入排序(Insert Sort)

    计数排序法:计数数组适用于当前数组密集的情况.例如(2,3,5,4,2,3,3,2,5,4) 方法:先找出最大值最小值,之后统计每个数出现的次数,根据次数从小到大往数组里添加 计数排序法是一种不需要比 ...