漂亮的ToolTip效果
样式已经定义好了,直接按照案例操作即可
XML/HTML Code
- <div id="container">
- <div class="item-tooltip">
- <div class="item">
- <span class="top-title">Sweet Strong </span>
- <div class="image-item"><img src="images/sweet-strong.png" /></div>
- </div>
- <div class="item-information">
- <span class="title">Style Name </span>
- <span class="information-content">
- tooltip-sweet-strong
- </span>
- <span class="title">Example </span>
- <span class="information-content">
- Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-sweet-strong" data-text-tooltip="Howdy, I'm your tooltip :) ">this link</a> to see how this tooltip works
- </span>
- </div>
- </div>
- <div class="item-tooltip">
- <div class="item">
- <span class="top-title">Mini Slick </span>
- <div class="image-item"><img src="images/mini-slick.png" /></div>
- </div>
- <div class="item-information">
- <span class="title">Style Name </span>
- <span class="information-content">
- tooltip-mini-slick
- </span>
- <span class="title">Example </span>
- <span class="information-content">
- Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-mini-slick" data-text-tooltip="Edit Me? ">this link</a> to see how this tooltip works
- </span>
- </div>
- </div>
- <div class="item-tooltip">
- <div class="item">
- <span class="top-title">Big Grey </span>
- <div class="image-item"><img src="images/big-grey.png" /></div>
- </div>
- <div class="item-information">
- <span class="title">Style Name </span>
- <span class="information-content">
- tooltip-big-grey
- </span>
- <span class="title">Example </span>
- <span class="information-content">
- Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-big-grey" data-text-tooltip="This is our tooltip. <br/> How about yours? ">this link</a> to see how this tooltip works
- </span>
- </div>
- </div>
- <div class="item-tooltip">
- <div class="item">
- <span class="top-title">Nightly </span>
- <div class="image-item"><img src="images/nightly.png" /></div>
- </div>
- <div class="item-information">
- <span class="title">Style Name </span>
- <span class="information-content">
- tooltip-nightly
- </span>
- <span class="title">Example </span>
- <span class="information-content">
- Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-nightly" data-text-tooltip="Nightly Nightly">this link</a> to see how this tooltip works
- </span>
- </div>
- </div>
- <div class="item-tooltip">
- <div class="item">
- <span class="top-title">Shiny Red </span>
- <div class="image-item"><img src="images/shiny-red.png" /></div>
- </div>
- <div class="item-information">
- <span class="title">Style Name </span>
- <span class="information-content">
- tooltip-shiny-red
- </span>
- <span class="title">Example </span>
- <span class="information-content">
- Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-shiny-red" data-text-tooltip="This is shiny red">this link</a> to see how this tooltip works
- </span>
- </div>
- </div>
- <div class="item-tooltip">
- <div class="item">
- <span class="top-title">Soft Blue </span>
- <div class="image-item"><img src="images/soft-blue.png" /></div>
- </div>
- <div class="item-information">
- <span class="title">Style Name </span>
- <span class="information-content">
- tooltip-soft-blue
- </span>
- <span class="title">Example </span>
- <span class="information-content">
- Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-soft-blue" data-text-tooltip="Really soft blue">this link</a> to see how this tooltip works
- </span>
- </div>
- </div>
- <div class="item-tooltip">
- <div class="item">
- <span class="top-title">Big Yellow </span>
- <div class="image-item"><img src="images/big-yellow.png" /></div>
- </div>
- <div class="item-information">
- <span class="title">Style Name </span>
- <span class="information-content">
- tooltip-big-yellow
- </span>
- <span class="title">Example </span>
- <span class="information-content">
- Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-big-yellow" data-text-tooltip="This is big yellow">this link</a> to see how this tooltip works
- </span>
- </div>
- </div>
- </div>
原文地址:http://www.freejs.net/article_jquerywenzi_326.html