Using CSS alone to implement dynamic prompt information may have been discovered to be capable of writing like this...
CSS code
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.
Text to be annotatedPrompt information
2. Prompt information
<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} p # 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 {display: none} a.info: hover span {dis Play: 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> <body> <p id = "main"> How can I achieve information prompting without js by simply using CSS ?! (Except title and alt) By [51js.com] zdzhuo Ie5.5 +, Opera7.0, Netscap7.0, mozilla1.4 can be used normally. <B> This is the prompt information </B> www.51js.com, which can be implemented without js. <B> it is very easy to implement the prompt information by using CSS alone </B> this is my dedicated profile picture on 51js.com. </p> </body>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]