官术网_书友最值得收藏!

Simple custom tooltips

Browsers automatically create tooltips when you include the title attribute on your HTML element. Titles are usually used on links and images, but they can be added to nearly every type of HTML element. When your site visitors hover their mouse cursor over an element with a title attribute or move focus to the item by tabbing to it using the keyboard, the tooltip will appear—usually as a small yellow box that appears to be floating over the page.

Tooltips are a great way to add a little additional information to your page. Screen reader software reads out tooltip text for site visitors with disabilities who are using assistive technology, making them useful for enhancing accessibility. Furthermore, the title attributes on images and links can help search engines index your content more effectively.

I hope I've convinced you that the title attributes are great for enhancing both the usability and the accessibility of your site. The only problem with tooltips is that they can't be customized in any way. Each browser has its own style of tooltip and that style is not accessible via CSS. This is fine, but sometimes, it's nice to have more control over the appearance of tooltips.

主站蜘蛛池模板: 永胜县| 肇州县| 天气| 佳木斯市| 马关县| 海盐县| 叙永县| 耿马| 齐河县| 会东县| 聂荣县| 新营市| 景德镇市| 江川县| 汤原县| 桑植县| 靖江市| 弋阳县| 金坛市| 沂南县| 穆棱市| 石林| 萨嘎县| 宜春市| 陵水| 百色市| 潍坊市| 邢台县| 宜良县| 包头市| 宝坻区| 南陵县| 绥化市| 汶川县| 宜丰县| 永福县| 阿合奇县| 菏泽市| 丹寨县| 福建省| 阜新|