Advertisement
sonars

Untitled

Jul 24th, 2014
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. styles.css
  2.  
  3.  
  4. .tooltip {
  5. left: 0;
  6. overflow: hidden;
  7. position: fixed;
  8. top: 15%;
  9. padding: 5px 0;
  10. font-family: Arial, sans-serif;
  11. width: 100%;
  12. z-index: 99991;
  13. }
  14. .tooltip h6 {
  15. font-size: 13px;
  16. padding: 10px;
  17. font-weight: normal;
  18. color: #444444;
  19. font-family: Arial, sans-serif;
  20. }
  21. .tooltip > .container {
  22. overflow: hidden;
  23. width: 600px;
  24. height: auto;
  25. padding-top: 0;
  26. background: #fff;
  27. position: relative;
  28. box-shadow: 0 0 0 5px rgba(0,0,0,0.15);
  29. margin: 0 auto 0 auto;
  30. }
  31.  
  32. .tooltip .close {
  33. color: #1a2f43;
  34. cursor: pointer;
  35. float: right;
  36. margin: 7px 14px 0 0;
  37. font-weight: bold;
  38. opacity: 0.3;
  39. font-size: 15px;
  40. position: absolute;
  41. right: 0;
  42. }
  43.  
  44. .tooltip .close:hover {
  45. opacity: 0.5;
  46. }
  47.  
  48. utworzy plik action.js i dodaj go do headera :) Tutaj jego kod:
  49.  
  50. jQuery(document).ready(function() {
  51.  
  52. $('.close').click(function () {
  53. jQuery('.tooltip,.tooltip .container').animate({'opacity': '0'}, 300, 'linear', function () {
  54. jQuery('.tooltip,.tooltip .container').css('display', 'none');
  55. });
  56. });
  57.  
  58. });
  59.  
  60. A do htmla dodaj:
  61.  
  62. <div class="tooltip">
  63. <div class="container">
  64. <div class="close">x</div>
  65. <h6>Reklama</h6>
  66. <div class="content">
  67. <img src="urbancity_600x400zzz.jpg" alt="" />
  68. </div>
  69. </div>
  70. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement