jquery Lightweight mouse hover translucent matte effect, a look to understand OH

Source: Internet
Author: User

<title>jquery translucent matte effect when hovering over a picture </title>
<style>
*{margin:0;padding:0;}
Li{list-style:none;}
. box{width:800px;height:400px;margin:50px Auto;overflow:hidden;}
. box ul Li{width:200px;height:200px;float:left;position:relative;overflow:hidden;}
. Box ul Li. dask{width:170px;height:180px;padding:20px 0 0 30px;background: #000; opacity:0.8;position:absolute;top:- 200px;left:0;}
. Box ul Li Dask p{color: #fff;}
. Box ul li. Dask a{color:green;text-decoration:none}
</style>
<script type= "Text/javascript" src= "/ajaxjs/jquery-1.9.1.min.js" ></script>
<script>
$ (function () {
$ (". Box ul Li"). Hover (
function () {
$ (this). Find (". Dask"). Stop (). Delay ((). Animate ({"Top": 0,opacity:0.8},300)
},
function () {
$ (this). Find (". Dask"). Stop (). Animate ({"Top": -200,opacity:0},300)
}

)
})
</script>
<body>
<div class= "box" >
<ul>
<li>
<a href= "www.nftx8.com" ></a>
<div class= "Dask" >
<p> Tsuen Wan Hi-Tech </p>
<p> Day Wear </p>
<a href= "/" > The beauty of your imagination </a>
</div>
</li>
<li>
<a href= "www.nftx8.com" ></a>
<div class= "Dask" >
<p> Sunset </p>
<p> Days of mistake </p>
<a href= "/" > Natural Beauty </a>
</div>
</li>
</ul>
</div>
</body>


Change the img inside SRC to your local image name.



SOURCE www.nftx8.com

jquery Lightweight mouse hover translucent matte effect, a look to understand OH

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.