graph.css 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /* #######################################################
  2. HOW TO CREATE AN INTERACTIVE GRAPH USING CSS3 & JQUERY [TUTORIAL]
  3. "How to create an Interactive Graph using CSS3 & jQuery [Tutorial]" was specially made for DesignModo by our friend Valeriu Timbuc.
  4. Links:
  5. http://vtimbuc.net
  6. http://designmodo.com
  7. http://vladimirkudinov.com
  8. ######################################################## */
  9. /* Resets */
  10. .graph-container,
  11. .graph-container div,
  12. .graph-container a,
  13. .graph-container span {
  14. margin: 0;
  15. padding: 0;
  16. }
  17. /* Gradinet and Rounded Corners */
  18. .graph-container, #tooltip, .graph-info a {
  19. }
  20. /* Graph Container */
  21. .graph-container {
  22. position: relative;
  23. width: 100%;
  24. height: 528px;
  25. padding: 20px;
  26. }
  27. .graph-container > div {
  28. position: absolute;
  29. width: inherit;
  30. height: inherit;
  31. top: 0px;
  32. left: 2px;
  33. }
  34. .graph-info {
  35. width: 590px;
  36. margin-bottom: 10px;
  37. }
  38. /* Text Styles */
  39. #tooltip, .graph-info a {
  40. height: 25px;
  41. font-size: 12px;
  42. line-height: 13px;
  43. color: #999;
  44. }
  45. .tickLabel {
  46. font-size: 1.2em;
  47. color: #999;
  48. }
  49. /* Tooltip */
  50. #tooltip {
  51. position: absolute;
  52. display: none;
  53. padding: 5px 10px;
  54. border: 1px solid #999;
  55. }
  56. /* Links */
  57. .graph-info a {
  58. position: relative;
  59. display: inline-block;
  60. float: left;
  61. padding: 7px 10px 5px 30px;
  62. margin-right: 10px;
  63. text-decoration: none;
  64. cursor: default;
  65. }
  66. /* Color Circle for Links */
  67. .graph-info a:before {
  68. position: absolute;
  69. display: block;
  70. content: '';
  71. width: 8px;
  72. height: 8px;
  73. top: 13px;
  74. left: 13px;
  75. -webkit-border-radius: 5px;
  76. -moz-border-radius: 5px;
  77. border-radius: 5px;
  78. }
  79. /* Colors For each Link */
  80. .graph-info .visitors { border-bottom: 2px solid #67398C; }
  81. .graph-info .returning { border-bottom: 2px solid #77b7c5; }
  82. .graph-info .visitors:before { background: #67398C; }
  83. .graph-info .returning:before { background: #67398C; }
  84. /* Hide the First and Last Y Label */
  85. .yAxis .tickLabel:first-child,
  86. .yAxis .tickLabel:last-child { display: none; }
  87. /* Clear Floats */
  88. .graph-info:before, .graph-info:after,
  89. .graph-container:before, .graph-container:after {
  90. content: '';
  91. display: block;
  92. clear: both;
  93. }
  94. .graph-container h3{
  95. font-size:1.5em;
  96. color:#FFF;
  97. margin-bottom:1em;
  98. }
  99. /*--media Quries for 1024px-laptops-*/
  100. @media(max-width: 1024px) {
  101. .graph-container {
  102. height: 499px;
  103. }
  104. }
  105. /*--media Quries for 768px-laptops-*/
  106. @media (max-width:768px) {
  107. .graph-container {
  108. height: 430px;
  109. margin: 1em;
  110. width: 94%;
  111. }
  112. }
  113. @media (max-width:320px) {
  114. .graph-container {
  115. height: 370px;
  116. margin: 1em;
  117. width: 94%;
  118. }
  119. }