Tooltip Tips)

Source: Internet
Author: User
Http://www.cnblogs.com/birdshome/archive/2005/09/01/AutoToolTip.html

It is a strict UI style that allows a web page to display lines of text that cannot be broken or do not want to be broken in a row, after all, a free discount row makes it difficult to grasp the table and the overall interface. Of course, when a row is not displayed in full time, it ends with a ellipsis. It prompts the user that the statement is not over. However, in this case, tooltip is essential to allow the user to see all the text.

Displaying tooltip on the Web is not easy. As long as you set the title attribute of the HTML element to a non-null string, it is naturally a tooltip. However, this is actually quite troublesome. Writing a title in advance will lead to several side effects: 1. Unnecessary content overhead. Due to the preset title attribute, the document will increase; 2. The tooltip is always displayed. Even if a line can be fully displayed, the tooltip is displayed. This will confuse the user and I thought I would explain something more; 3. Special characters are contained in the text to be displayed in the tooltip. For example, single quotation marks and double quotation marks are also required to encode the tooltip content on the server side.
Using the client script to process tooltip can avoid all the deficiencies and problems mentioned above. Example:

This is a long string. This is a long string.
This is a long string. This is a long string. This is a long string.
This is a long string. This is a long string. This is a long string.
This is a long string. This is a long string. This is a long string. This is a long string.

// The blue text is self-contained with tooltip. You can adjust the page size to see the adaptability of tooltip.

......
http://www.cnblogs.com/birdshome/archive/2005/09/01/AutoToolTip.html

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.