Use CSS to implement dynamic prompt information

Source: Internet
Author: User

Some people may have found that they can write...

CSSCodePart
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}

Body area call Method
1. <a class = "info" href = "javascript:;"> <B> text to be annotated </B> <span> prompt </span> </a>

2. <a class = "info" href = "javascript:;"> <span> message </span> </a><Textarea id = "runcode000060"> <br/> <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 start */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 {dis Play: None} a.info: hover span {display: block; position: absolute; top: 25px; left: 60px; width: 130px; Border: 1px solid # 0cf; Background-color: # CFF; color: #000; text-align: center}/* end of key code */</style> simply use CSS to achieve dynamic prompt information. Without JS, can the information prompt effect be achieved ?! (Except title and ALT) by [51js.com] zdzhuoie5.5 +, opera7.0, netscap7.0, mozilla1.4 can be used properly <p> <B> This is the prompt message </B> <span> www.51js.com </span> that can be implemented without JS <B> CSS alone implementation tips </B> <span> a very simple method <br/> the principle is also easy to understand </span> </P> <p> <span> private profile picture of 51js.com </span> </P> <p> </textarea>

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.