fd-slider-tooltip.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. Sample tooltip code. Only works on grade A browsers (so no IE6,7 or 8).
  3. See: http://nicolasgallagher.com/multiple-backgrounds-and-borders-with-css2/ for full info on
  4. how to style generated content & the associated pitfalls
  5. This code to be taken as experimental & untested - use at your discretion
  6. If showing the tooltip above the sider handle you are relegated to showing
  7. single line tooltips due to styling constraints!
  8. */
  9. .fd-slider-handle:before,
  10. .fd-slider-handle:after
  11. {
  12. /* Remove from screen */
  13. opacity:0;
  14. /* The following rules are not really needed as no browser yet supports CSS transitions
  15. on generated content but I'll leave it in for the day when they do! */
  16. /* Firefox */
  17. -moz-transition-property: opacity;
  18. -moz-transition-duration: 1s;
  19. -moz-transition-delay: 1s;
  20. /* WebKit */
  21. -webkit-transition-property: opacity;
  22. -webkit-transition-duration: 1s;
  23. -webkit-transition-delay: 1s;
  24. /* Opera */
  25. -o-transition-property: opacity;
  26. -o-transition-duration: 1s;
  27. -o-transition-delay: 1s;
  28. /* Standard */
  29. transition-property: opacity;
  30. transition-duration: 1s;
  31. transition-delay: 1s;
  32. }
  33. /*
  34. The tooltip body - as we position it above the slider and position the tooltip arrow
  35. below it, we need to know the height of the body. This means that multi-line tooltips
  36. are not supported.
  37. To support multi-line tooltips, you will need to position the tooltip below the slider
  38. and the tooltip pointer above the tooltip body. Additionally, you will have to set the
  39. tooltip bodies "height" to auto
  40. */
  41. .fd-slider-focused .fd-slider-handle:before,
  42. .fd-slider-hover .fd-slider-handle:before,
  43. .fd-slider-active .fd-slider-handle:before
  44. {
  45. display:block;
  46. position:absolute;
  47. top:-21px;
  48. left:-8px;
  49. margin:0;
  50. width:20px;
  51. padding:3px;
  52. height:14px;
  53. line-height:12px;
  54. text-align: center;
  55. font-size:10px;
  56. font-weight: bold;
  57. color:#fff;
  58. text-shadow: 1px 1px 1px #1a3a95;
  59. background:#2f6ee0;
  60. z-index:1;
  61. /* Use the ARIA valuetext property, set by the script, to generate the tooltip content */
  62. content:attr(aria-valuetext);
  63. /* Border radius and box shadow */
  64. -moz-border-radius:3px;
  65. -webkit-border-radius:3px;
  66. border-radius:3px;
  67. -moz-background-clip: padding;
  68. -webkit-background-clip: padding-box;
  69. background-clip: padding-box;
  70. -moz-box-shadow: 0 0 4px #aaa;
  71. -webkit-box-shadow: 0 0 4px #aaa;
  72. box-shadow: 0px 0px 4px #999;
  73. /* Change opacity for transition */
  74. opacity: 1;
  75. }
  76. /* The tooltip pointer */
  77. .fd-slider-focused .fd-slider-handle:after,
  78. .fd-slider-hover .fd-slider-handle:after,
  79. .fd-slider-active .fd-slider-handle:after
  80. {
  81. outline:none;
  82. content:"";
  83. display:block;
  84. position:absolute;
  85. top:-9px;
  86. left:50%;
  87. margin:0 0 0 -5px;
  88. background:#2f6ee0;
  89. z-index:2;
  90. width:10px;
  91. height:10px;
  92. overflow:hidden;
  93. /* Rotate element by 45 degress to get the "\/" pointer effect */
  94. -webkit-transform: rotate(45deg);
  95. -moz-transform: rotate(45deg);
  96. -o-transform: rotate(45deg);
  97. /* Add a box shadow */
  98. -moz-box-shadow: 0 0 4px #aaa;
  99. -webkit-box-shadow: 0 0 4px #aaa;
  100. box-shadow: 0 0 4px #aaa;
  101. /* Clip */
  102. clip:rect(4px, 14px, 14px, 4px);
  103. /* Change opacity for transition */
  104. opacity: 1;
  105. }
  106. /* Remove completely for IE */
  107. .oldie .fd-slider-handle:before,
  108. .oldie .fd-slider-handle:after
  109. {
  110. display:none;
  111. }