zoukankan      html  css  js  c++  java
  • 突出展示案例

    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>
    

      

  • 相关阅读:
    再次写给我们这些浮躁的程序员
    SecureCRT的安装与破解,详细过程
    【SecureCRT】SecureCRT 护眼配色
    [Shell]常用语法
    [mysql]查看mysql执行情况的几种方法
    [vbs]脚本启动
    js 获取 网页屏幕高度 窗口高度 元素高度 滚动高度
    angular2 ng build --prod 报错:Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'
    npm install warning: no description; no repository field
    vscode: Visual Studio Code 常用快捷键
  • 原文地址:https://www.cnblogs.com/luwn/p/12706663.html
Copyright © 2011-2022 走看看