Pure CSS tooltips (z)

Source: Internet
Author: User

What Is A tooltip? This is a tooltipAn
Aiding text that appears just when you roll on with the mouse.
Basic idea comes from Eric Meyer'sPure CSS
Popups
A very clever way to get dynamic effects on an HTML page
Using JavaScript.

My idea was to addPosition: relativeTo
Link, in order to allowSpanElement inside to position absolutely
Respect the parent link. This code has been tested in ie5.5, opera7.11 and
Mozilla 1.4 and works fine. Solved ie bug adding some Z-index, but with
Modifications done this technique will be buggy in opera7.2.

Now, let's have
Look at the basic CSSCascade style sheets,
Separation from content and presentationCode for the tooltip:

A.info {
Position: relative;/* This is
The key */
Z-index: 24;
Background-color: # CCC;
Color: #000;
Text-Decoration: None}

A.info: hover {z-index: 25;
Background-color: # ff0}

A.info span {display: None}

a.info: hover
span {/* The span will display just on: hover
state */
display: block;
position: absolute;
top: 2em;
left: 2em; width: 15em;
border: 1px solid
# 0cf;
background-color: # CFF;
color: #000;
text-align: center }< br>

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.