• jq 高级轮播图


    <!doctype html>
    <html lang="en">
    <head>
    	<meta charset="UTF-8" />
    	<title>Document</title>
    	<style>
    		*{
    			margin: 0;
    			padding: 0;
    		}
    		#outer{
    			 760px;
    			height: 300px;
    			overflow: hidden;
    			position: relative;
    			margin: 100px auto 0;
    		}
    		#outer div{
    			position: absolute;
    			left: 0;
    			right: 0;
    			 760px;
    			height: 300px;
    			display: none;
    		}
    		.text{
    			position: absolute;
    			 760px;
    			height: 300px;
    			left: -760px;
    			top: 0px;
    		}
    		.con{
    			position: absolute;
    			 760px;
    			height: 300px;
    			left: -30px;
    			top: 0px;
    			display: none;
    		}
    		ul{
    			position: absolute;
    			right: 10px;
    			bottom: 10px;
    			list-style: none;
    			overflow: hidden;
    			z-index: 99;
    			height: 12px;
    			 80px;
    		}
    		.active{
    			background: white;
    		}
    	</style>
    </head>
    <body>
    	<div id="outer">
    		<div style="background: url(img/bg1.jpg) no-repeat; display: block;">
    			<img src="img/text1.png" alt="" class="text" style="left: 0;"/>
    			<img src="img/con1.png" alt=""  class="con" style="left: 0;display: block;"/>
    		</div>
    		
    		<div style="background:url(img/bg2.jpg) no-repeat;">
    			<img src="img/text2.png" alt="" class="text"/>
    			<img src="img/con2.png" alt="" class="con"/>
    		</div>
    		<div style="background: url(img/bg3.jpg) no-repeat;">
    			<img src="img/text3.png" alt="" class="text"/>
    			<img src="img/con3.png" alt="" class="con"/>
    		</div>
    		
    		<div style="background: url(img/bg4.jpg) no-repeat;">
    			<img src="img/text4.png" alt="" class="text" />
    			<img src="img/con4.png" alt="" class="con"/>
    		</div>
    		
    		<div style="background: url(img/bg5.jpg) no-repeat;">
    			<img src="img/text5.png" alt=""  class="text"/>
    			<img src="img/con5.png" alt="" class="con"/>
    		</div>
    		
    		<ul>
    			<li class="active"></li>
    			<li></li>
    			<li></li>
    			<li></li>
    			<li></li>
    		</ul>
    	</div>
    	
    	<script src="js/jquery-2.2.1.min.js"></script>
    	<script>
    		var page = 0;
    		var time = setInterval(function(){
    			page++;
    			if(page > 4)
    			{
    				page = 0;
    			}
    			$(".text").css({"left":"-760px"});
    			$(".con").css({"left":"-30px","display":"none"})
    			$("#outer div").fadeOut(200,function(){
    				$("#outer div").eq(page).fadeIn(200,function(){
    					$("li").removeClass("active").eq(page).addClass("active");
    					$(".text").eq(page).animate({"left":0},500,function(){
    						$(".con").eq(page).css("display","block").animate({"left":"0"})
    					})
    				})
    			})
    		},3000)
    	</script>
    </body>
    </html>
    

      

  • 相关阅读:
    jenkins免密添加SSH Servers
    Workman启动失败的解决方法 stream_socket_server() has been disabled for security reasons
    jenkins主从从服务器发布脚本执行成功但总提示失败 FATAL: Remote call on XXXX failed
    mac OS配置用户全局环境变量(设置字符集为UTF8)
    使用 Application Loader提交IPA文件到苹果市场
    IOS使用批处理打包
    Java进阶知识24 Spring对JDBC的支持
    Java进阶知识23 Spring execution 切入点表达式
    Java进阶知识22 Spring的AOP编程
    Java进阶知识21 Spring的代理模式
  • 原文地址:https://www.cnblogs.com/mingjixiaohui/p/5275146.html
Copyright © 2020-2023  润新知