JQuery enables the mouse to go through the image to become brighter and dimmed.

Source: Internet
Author: User

JQuery enables the mouse to go through the image to become brighter and dimmed.

The image of the imitation mall implemented by jQuery is highlighted and dimmed. After you hover the mouse over the image, the image is brightened and other images are dimmed. Move the mouse to highlight all the images and be compatible with mainstream browsers. Applicable browsers: IE8, 360, FireFox, Chrome, Safari, Opera, aoyou, sogou, and windows of the world. If you have any need, refer to the following.

The complete source code is as follows:

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<Html xmlns = "http://www.w3.org/1999/xhtml">

<Head>

<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>

<Title> jQuery enables the mouse to brighten the image </title> <base target = "_ blank"/>

<Style type = "text/css">

A {color: white ;}

Body {background: #000 ;}

Body, div, ul, li, img {padding: 0; margin: 0; border: 0; list-style: none ;}

. Hovertreebox {width: 630px; border: 1px solid # ccc; margin: 10px auto; overflow: hidden; padding: 10px 0 0 10px ;}

. Hovertreebox li {width: 200px; height: 186px; float: left; margin-right: 10px; margin-bottom: 10px; cursor: pointer ;}

</Style>

<Script type = "text/javascript" src = "jquery/jquery-1.11.2.min.js"> </script>

<Script type = "text/javascript">

$ (Function (){

$ ('. Hovertreebox li'). mouseover (function (e ){

$ (This). siblings (). stop (). fadeTo (500, 0.4 );

});

$ ('. Hover' + 'treebox li'). mouseout (function (e ){

$ (This). siblings (). stop (). fadeTo (500,1 );

});

})

</Script>

</Head>

 

<Body>

<Div style = "color: white"> jQuery highlights the cursor entries in the image list

<Br/> </div>

<Div class = "hovertreebox" id = "hovertreelist">

<Ul>

<Li> </li>

<Li> </li>

<Li> </li>

<Li> </li>

<Li> </li>

<Li> </li>

</Ul>

</Div>

</Body>

</Html>

The above is all the content of this article. I hope you will like it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.