• 突出展示案例


    html文件:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>突出展示案例</title>
    <style type="text/css">
    	* {
    		margin: 0;
    		padding: 0;
    	}
    	ul {
    		list-style: none;
    	}
    	body {
    		background: #000;
    	}
    	.wrap {
    		margin: 100px auto 0;
    		 446px;
    		height: 394px;
    		padding:10px 0 0 10px;
    		background: #000;
    		overflow: hidden;
    		border: 1px solid #fff;
    	}
    	.wrap li {
    		float: left;
    		margin: 0 10px 10px 0;
    	}
    	.wrap img {
    		display: block;
    		border: 0;
    	}
    </style>
    <script src="https://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript">
    	$(function(){
    		     //mouseover:鼠标经过事件
         		 //mouseout:鼠标离开事件
         		 //mouseenter:鼠标进入事件
         		 //mouseleave:鼠标离开事件
    		$(".wrap>ul>li").mouseenter(function(){
    			$(this).css("opacity","1").siblings().css("opacity","0.4");
    		});
    		$(".wrap").mouseleave(function(){
    		//让所有的li都变亮
            //$("li");
            //$(".wrap li");
            //$(".wrap>ul>li")
            
            //$(this).children().children("li");
            $(this).find('li').css("opacity", 1);
    		})
    	})
    </script>
    </head>
    <body>
    	<div class="wrap">
    		<ul>
    			<li><a href="#"><img src="https://images.cnblogs.com/cnblogs_com/luwn/1701485/t_200415035849d3a83afb3f3b8c1bb4ac77a2e61a5eae.jpg" alt=""></a></li>
    			<li><a href="#"><img src="https://images.cnblogs.com/cnblogs_com/luwn/1701485/t_200415035849d3a83afb3f3b8c1bb4ac77a2e61a5eae.jpg" alt=""></a></li>
    			<li><a href="#"><img src="https://images.cnblogs.com/cnblogs_com/luwn/1701485/t_200415035849d3a83afb3f3b8c1bb4ac77a2e61a5eae.jpg" alt=""></a></li>
    			<li><a href="#"><img src="https://images.cnblogs.com/cnblogs_com/luwn/1701485/t_200415035849d3a83afb3f3b8c1bb4ac77a2e61a5eae.jpg" alt=""></a></li>
    			<li><a href="#"><img src="https://images.cnblogs.com/cnblogs_com/luwn/1701485/t_200415035849d3a83afb3f3b8c1bb4ac77a2e61a5eae.jpg" alt=""></a></li>
    			<li><a href="#"><img src="https://images.cnblogs.com/cnblogs_com/luwn/1701485/t_200415035849d3a83afb3f3b8c1bb4ac77a2e61a5eae.jpg" alt=""></a></li>
    		</ul>
    	</div>
    </body>
    </html>
    

      

  • 相关阅读:
    flashdevelop生成swc库(转)
    SOG and COG spec
    [C]switch...case...一个case包含多个值的一种写法
    [C]赋值语句返回值
    Antenna知识整理
    SPI接口比IIC速度快的理解
    C语言代码的换行
    SRRC认证
    蓝牙协议分析(6)_BLE地址类型
    结构体变量和指针对成员的引用形式
  • 原文地址:https://www.cnblogs.com/luwn/p/12706663.html
Copyright © 2020-2023  润新知