• transition实现图片轮播


    <!DOCTYPE html>

    <html>

    <head>

    <meta charset="utf-8" />

    <title>css3 通过transform属性实现DIV元素的旋转</title>

    <style>
    #content{800px;margin: 30px auto;position: relative;}
    input[type="radio"]{display: none;}
    input[type="radio"]~img{ 800px;position: absolute;top:0px;left:0px;opacity: 0;height: 500px;transform:scale(1.1);transition:all 2s;}
    input:checked +label + img{opacity: 1;transform:scale(1.0);}
    input:checked +label img{border: 8px solid #FFDA34; opacity: 1.0; transition: all 2s;}
    label {display: inline-block; 134px;margin: 5px 8px;}
    label img{ opacity:0.5; 134px; margin-top:500px;height: 75px;border:8px solid #000;}
    </style>

    </head>

    <body>

    <div class="aimateStyle">

    </div>

    <div id = "content">
    <input type = "radio" name="carousel" id = "list1" checked>
    <label for="list1">
    <img src="http://p0.meituan.net/deal/d1d4b099f0f6258296f20b4782c479a254150.jpg%40450w_280h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D5%26y%3D5%26relative%3D1">
    </label>
    <img src="http://p0.meituan.net/deal/d1d4b099f0f6258296f20b4782c479a254150.jpg%40450w_280h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D5%26y%3D5%26relative%3D1">

    <input type = "radio" name="carousel" id = "list2">
    <label for="list2">
    <img src="http://p1.meituan.net/deal/12cf752971008356d4c77685356aa9e355639.jpg%40450w_280h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D5%26y%3D5%26relative%3D1">
    </label>
    <img src="http://p1.meituan.net/deal/12cf752971008356d4c77685356aa9e355639.jpg%40450w_280h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D5%26y%3D5%26relative%3D1">

    <input type = "radio" name="carousel" id = "list3">
    <label for="list3">
    <img src="http://p0.meituan.net/deal/723ef89c388ea1dba03e021291b153e953366.jpg%40450w_280h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D5%26y%3D5%26relative%3D1">
    </label>
    <img src="http://p0.meituan.net/deal/723ef89c388ea1dba03e021291b153e953366.jpg%40450w_280h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D5%26y%3D5%26relative%3D1">
    </div>

    <script type="text/javascript">
    window.onload = function(){
    var i = 0;
    setInterval(function(){
    document.getElementsByTagName('input')[i%3].checked = true;
    i++;
    }, 2500);
    }
    </script>
    </body>

    </html>

    实现效果静态图

  • 相关阅读:
    Linux-第一天
    Hadoop学习10--常用命令记录帖
    C# asp.net repeater实现排序功能,自动排序,点击头部排序,点击列排序
    图片与字符之间的转换
    兼容浏览器 div固定浏览器窗口底部 浮动div
    解决QQ未启用状态,QQ留言图标未启用
    C#Cookie操作类,删除Cookie,给Cookie赋值
    vs2008bin下Debug bll Release文件 obj下的Debug bll Release文件区别
    asp.net限制了上传文件大小为..M,解决方法
    多文件上传ajax jquery
  • 原文地址:https://www.cnblogs.com/liangxuru/p/5955558.html
Copyright © 2020-2023  润新知