Simply using CSS to implement dynamic hint information _css/html

Source: Internet
Author: User
It may have been found that it can be written ...

CSS Code section
A.info {
position:relative; z-index:0; Background-color: #ccc; Color: #000; Text-decoration:none}

A.info:hover {
Z-index:1; Background-color: #ff0}

A.info span {
Display:none}

A.info:hover span {
Display:block; Position:absolute; top:12px; left:2px; width:160px; border:1px solid #0cf; Background-color: #cff; Color: #000; Text-align:center}

The body area calls the method
1.<a class= "Info" href= "javascript:;" ><b> text </b><span> hint information to add comments </span></a>

2.<a class= "Info" href= "javascript:;" ><span> tips </span></a>
<style> Body {Font:verdena font-size:14px color: #000} h1{Font:verdena font-size:22px; color: #000} h2{Font : Verdena; font-size:15px; Color: #000; Text-align:left} div#main {margin:30}//* Key code started * * A.info {position:relative; z-index:0: #ccc; background-color Or: #000; Text-decoration:none} a.info:hover {z-index:1; Background-color: #ff0} a.info span {display:none} A.info:hov Er span {display:block; position:absolute; top:25px; left:60px; width:130px; border:1px solid #0cf; Background-color: #cf F Color: #000; Text-align:center}//Key code end */</style> <body> <div id= "main" > <p> simply use CSS to implement dynamic hint information </p&gt ; <p> without JS can realize the effect of information hint?! (except title and ALT) </p> <p>by [51js.com]zdzhuo</p> <p>ie5.5+, Opera7.0, Netscap7.0, Mozilla1.4 Can be used </p> <b> This is the hint information </b><span>www.51js.com</span> do not need to be able to achieve the message of JS <a class= "Info" href= "javascript:;" ><b> simply use CSS to implement hint information </b><span&gtA very simple method principle is also easy to understand </span> <span> This is my special avatar in 51js.com </span> </div> </body>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
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.