源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

jQuery Tools tooltip使用说明

  • 时间:2021-11-01 09:20 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:jQuery Tools tooltip使用说明
HTML
[url=./tooltip-generic.css]<style> #myform { border:1px outset #ccc; background:#fff repeat-x; padding:20px; margin:20px auto; width:350px; font-size:12px; -moz-border-radius:4px; } #myform h3 { text-align:center; margin:0 0 10px 0; } /* http://www.quirksmode.org/css/forms.html */ #inputs label, #inputs input, #inputs textarea, #inputs select { display: block; width: 150px; float: left; margin-bottom: 20px; } #inputs label { text-align: right; width: 75px; padding-right: 20px; } #inputs br { clear: left; } </style> </head> <body><form id="myform" action="#"> <h3>Registration Form</h3> <div id="inputs"> <!-- username --> <label for="username">Username</label> <input id="username" title="Must be at least 8 characters."/> <br /> <!-- password --> <label for="password">Password</label> <input id="password" type="password" title="Make it hard to guess." /> <br /> <!-- email --> <label for="email">Email</label> <input id="email" title="We won't send you any marketing material." /> <br /> <!-- message --> <label for="body">Message</label> <textarea id="body" title="What's on your mind?"></textarea> <br /> <!-- message --> <label for="where">Select one</label> <select id="where" title="Select one of these options"> <option>-- first option --</option> <option>-- second option --</option> <option>-- third option --</option> </select> <br /> </div> <!-- email --> <label> I accept the terms and conditions <input type="checkbox" id="check" title="Required to proceed" /> </label> <p> <button type="button" title="This button won't do anything"> Proceed </button> </p> </form> <!-- javascript coding --> <script> // execute your scripts when the DOM is ready. this is a good habit $(function() { // select all desired input fields and attach tooltips to them $("#myform :input").tooltip({ // place tooltip on the right edge position: "center right", // a little tweaking of the position offset: [-2, 10], // use the built-in fadeIn/fadeOut effect effect: "fade", // custom opacity setting opacity: 0.7 }); }); </script> </body> </html>
CSS CSS可以不需要,这样显示的样子恶心了点。 关键代码:
[url=http://jquerytools.org/demos/tooltip/custom-effect.htm]http://jquerytools.org/demos/tooltip/custom-effect.htm[/url]   tab:传送门   tab(幻灯片):传送门   tooltip:传送门   overlay:传送门   dateinput:传送门 在携程做着framework2.0,研究的却是framework4.0,当时是怎么想的T.T。全是TMD老技术和堆代码
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部