案例:jQuery UI案例     状态:可编辑再运行    进入竖版
 运行结果 
AخA
<p>但是由于它不是一个原生的工具提示框,所以它可以被定义样式。通过 <a href="//themeroller.com" title="ThemeRoller:jQuery UI 的主题创建应用程序">ThemeRoller</a> 创建的主题也可以相应地定义工具提示框的样式。</p>
 
1
<!doctype html>
2
<html lang="en">
3
<head>
4
  <meta charset="utf-8">
5
  <title>jQuery UI 工具提示框(Tooltip) - 自定义样式</title>
6
  <link rel="stylesheet" href="/css/jqu1.10.4/jquery-ui.min.css">
7
  <script src="/js/jqu/jquery.min1.10.2.js"></script>
8
  <script src="/js/jqu/jquery-ui.min1.10.4.js"></script>
9
  <link rel="stylesheet" href="jqueryui/style.css">
10
  <script>
11
  $(function() {
12
    $( document ).tooltip({
13
      position: {
14
        my: "center bottom-20",
15
        at: "center top",
16
        using: function( position, feedback ) {
17
          $( this ).css( position );
18
          $( "<div>" )
19
            .addClass( "arrow" )
20
            .addClass( feedback.vertical )
21
            .addClass( feedback.horizontal )
22
            .appendTo( this );
23
        }
24
      }
25
    });
26
  });
27
  </script>
28
  <style>
29
  .ui-tooltip, .arrow:after {
30
    background: black;
31
    border: 2px solid white;
32
  }
33
  .ui-tooltip {
34
    padding: 10px 20px;
35
    color: white;
36
    border-radius: 20px;
37
    font: bold 14px "Helvetica Neue", Sans-Serif;
38
    text-transform: uppercase;
39
    box-shadow: 0 0 7px black;
40
  }
41
  .arrow {
42
    width: 70px;
43
    height: 16px;
44
    overflow: hidden;
45
    position: absolute;
46
    left: 50%;
47
    margin-left: -35px;
48
    bottom: -16px;