dmilosavleski

4 - 1

Dec 25th, 2017
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 KB | None | 0 0
  1. <!doctype html>
  2.  
  3. <html lang="en">
  4. <head>
  5. <meta charset="utf-8" />
  6. <title>Задача 1</title>
  7. <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
  8. <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
  9. <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
  10. <style>
  11.  
  12. </style>
  13.  
  14.  
  15. </head>
  16.  
  17. <script>
  18.  
  19. $(function() {
  20. $("#effect").change(function(){
  21. $( document ).tooltip({
  22. show: {
  23. effect: $( "#effect" ).val(),
  24. delay: 50
  25. },
  26. position: {
  27. my: "center bottom-20",
  28. at: "left top",
  29. using: function( position, feedback ) {
  30. $( this ).css( position );
  31. $( "<div>" )
  32. .addClass( "arrow" )
  33. .addClass( feedback.vertical )
  34. .addClass( feedback.horizontal )
  35. .appendTo( this );
  36. }
  37. }
  38. })
  39. })
  40. });
  41. </script>
  42.  
  43. <style>
  44. .ui-tooltip, .arrow:after {
  45. background: black;
  46. border: 2px solid white;
  47. position: absolute;
  48. left:-50px;
  49. }
  50. .ui-tooltip {
  51. padding: 10px 20px;
  52. color: white;
  53. border-radius: 20px;
  54. font: bold 14px "Helvetica Neue", Sans-Serif;
  55. text-transform: uppercase;
  56. box-shadow: 0 0 7px black;
  57. position:absolute;
  58. left:-40px;
  59. }
  60. .arrow {
  61. width: 70px;
  62. height: 16px;
  63. overflow: hidden;
  64. position: absolute;
  65. left: 40px;
  66. margin-left: -40px;
  67. bottom: -16px;
  68. }
  69. .arrow.top {
  70. top: -16px;
  71. bottom: auto;
  72. }
  73. .arrow.left {
  74. left: 20px;
  75. }
  76. .arrow:after {
  77. content: "";
  78. position: absolute;
  79. left: 20px;
  80. top: -20px;
  81. width: 25px;
  82. height: 25px;
  83. box-shadow: 6px 5px 9px -9px black;
  84. -webkit-transform: rotate(45deg);
  85. -moz-transform: rotate(45deg);
  86. -ms-transform: rotate(45deg);
  87. -o-transform: rotate(45deg);
  88. tranform: rotate(45deg);
  89. }
  90. .arrow.top:after {
  91. bottom: -20px;
  92. top: auto;
  93. }
  94.  
  95. </style>
  96.  
  97. <body >
  98.  
  99.  
  100. <div style="width:400px; margin:100px auto;">
  101. <select id="effect">
  102. <option value="blind">Blind</option>
  103. <option value="bounce">Bounce</option>
  104. <option value="clip">Clip</option>
  105. <option value="drop">Drop</option>
  106. <option value="explode">Explode</option>
  107. <option value="fade">Fade</option>
  108. <option value="fold">Fold</option>
  109. <option value="highlight">Highlight</option>
  110. <option value="puff">Puff</option>
  111. <option value="pulsate">Pulsate</option>
  112. <option value="scale">Scale</option>
  113. <option value="shake">Shake</option>
  114. <option value="size">Size</option>
  115. <option value="slide">Slide</option>
  116.  
  117. <option value="myAnimation">My animation</option>
  118. </select>
  119. <br/><br/>
  120. <div style="width:100px">Име:</div><input id="ime" class="tooltip" name="ime" style="width:200px" title="Име"/>
  121.  
  122. </div>
  123. </body>
  124. </html>
Add Comment
Please, Sign In to add comment