圖片
code
<!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>使用jQuery UI修飾title屬性的氣泡懸浮框(Tooltip) - 柯樂義</title> <script type="text/javascript" src="http://www.keleyi.com/keleyi/pmedia/jquery-1.9.1.min.js"></script> <link rel="stylesheet" href="http://www.keleyi.com/keleyi/pmedia/jquery/ui/1.10.2/themes/sunny/jquery-ui.min.css" /> <script type="text/javascript" src="http://www.keleyi.com/keleyi/pmedia/jquery/ui/jquery-ui-1.10.2.custom.min.js"></script> <script type="text/javascript"> $(function () { $(document).tooltip(); }); </script> <style type="text/css"> label { display: inline-block; } </style> </head> <body> <h2>不一樣的懸浮提示框</h2> <p>如果為一個元素添加了title屬性,那么當光標移到該元素上時,會在元素旁顯示出一個懸浮提示框。</p> <p>一般懸浮提示框是無法使用樣式修飾的,但如果使用<a href="http://www.keleyi.com/menu/jquery/" title="jQuery特效、資料等學習內容。" target="_blank">jQuery</a> UI,則可以顯示不同效果了,方法很加單:$(document).tooltip(); </p><p>把光標移到輸入框(或超鏈接)上看看懸浮提示框的效果吧。</p> <p><label for="age">Email:</label><input id="age" title="可作為取回密碼的手段,建議填寫。" /></p> <p><a href="http://www.keleyi.com" target="_blank" title="柯樂義首頁">柯樂義</a> 現在是樣式一 <a href="http://www.keleyi.com/keleyi/phtml/tooltip/tooltip2.htm" title="樣式二:redmond">樣式二</a> <a href="http://www.keleyi.com/a/bjac/a6d651710217f7a0.htm" target="_blank" title="查看原文">原文</a></p> </body> </html>