Home  >  Article  >  Web Front-end  >  jQuery NetEase photo album mouse movement display and hide effect implementation code_jquery

jQuery NetEase photo album mouse movement display and hide effect implementation code_jquery

WBOY
WBOYOriginal
2016-05-16 17:38:531245browse

In fact, it is mainly the application of jquery layer selector, jquery experts can skip it. . .

The rendering of NetEase Photo Album is as follows: When the mouse moves over the photo, "Set as Cover | Delete" is displayed, and it is hidden when the mouse is moved. This effect is often used in web development. So to summarize

Upload the code directly:

Copy the code The code is as follows:




Insert title here

.al_info{display: none;}
#imgdiv {float: left;width: 170px;height: 130px; display: block; padding:15px 10px;}
#imgdiv img{width:160px;height:140px;}



< ;/head>



jQuery NetEase photo album mouse movement display and hide effect implementation code_jquerytitle="myhome photo" alt="jQuery NetEase photo album mouse movement display and hide effect implementation code_jquery"
src="/FileManager/upload/photo/l9pztyhx5tY=/nJnRixC/lG8=/e400bd4c851240459db967b721c5101e_a.JPG" >


jQuery NetEase photo album mouse movement display and hide effect implementation code_jquery 2 photos in total Photos


Edit Properties|< ;a
href="#">delete



jQuery NetEase photo album mouse movement display and hide effect implementation code_jquerytitle="myhome photo" alt="jQuery NetEase photo album mouse movement display and hide effect implementation code_jquery"
src="/FileManager/upload/photo/l9pztyhx5tY= /nJnRixC/lG8=/e400bd4c851240459db967b721c5101e_a.JPG">

class="al_info">Total 2 photos


|href="#">Delete



jQuery NetEase photo album mouse movement display and hide effect implementation code_jquerytitle="myhome photo" alt="jQuery NetEase photo album mouse movement display and hide effect implementation code_jquery"
src= "/Filemanager/upload/photo/l9pztyhx5ty=/njnrixc/lg8=/e400bd4c8512459db96721c5101e_a.jpg">
& lt;/span & lt; br & g t;
& lt; span title = "myHome" class = "name" >jQuery NetEase photo album mouse movement display and hide effect implementation code_jquery
2 photos in total


Edit properties|href="#">Delete

< ;/div>




Run result:

In fact, it’s mainly jquery’s layer selector :

$("div span")//Select all elements in

$("div>span")//Select the element named element ; element (only one)
$('prev next')//Select the next element immediately after the prev element (all matching objects)
$('prev~siblings')//Select prev All sibling elements after the element

The "find()" method used here is to select the element within the element.

I haven’t used JQeruy for more than a year, and I have forgotten all the methods. Let’s review it.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn