Display hidden layers with CSS styles

Source: Internet
Author: User
Tags visibility

This method does not use JavaScript. The code is small and simple. The displayed layer is automatically at the link.
The following code is added to the page. When you hover the mouse over the link "1234567890", the layer content "11111111" is displayed. When you move the mouse away, the layer is restored to the hidden state.

The code is as follows: Copy code
<A href = "####" style = "color: blue" onMouseOver = "document. all. layer1.style. visibility = ''" onMouseOut = "document. all. layer1.style. visibility = 'siden' ">
</A> 1234567890
<Div id = "Layer1" style = "position: absolute; width: 300px; height: 100px; z-index: 1; background-color: # CCFFFF; layer-background-color: # CCFFFF; border: 1px none #000000; visibility: hidden "> 11111111 </div>
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.