CSS to hover the div layer at the top

Source: Internet
Author: User

The effect is as follows:


This is to make a picture of a div hover over the map, the CSS code is as follows

. tl {
	width:240px;
	height:193px;
	position:absolute;/* here to set the *
	/z-index:999999;/* Here is the distance between the element and the display, it is said that the bigger the better, but I also did not see the effect, because it is not possible to do it */
	Margin-top : 20%;
	Margin-left: -209px; 
	Background-image:url ("/ship_three/images/tl.png");
	-webkit-transition:. 5s ease-in-out;/* CSS Transition allows the CSS's property values to transition from one state to another in a certain amount of time *
	/-moz-transition:. 5s ease-in-out;/* here in order to be compatible with other browsers *
	/-o-transition:. 5s ease-in-out;
	Background-image:url ("/ship_three/images/tl.png");
}

Plus this code below, you can have an animated effect

. tl:hover {
	margin-left:0px;
}


Related Article

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.