timeline.css 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. .timeline {
  2. position: relative;
  3. padding: 20px 0 20px;
  4. list-style: none;
  5. }
  6. .timeline:before {
  7. content: " ";
  8. position: absolute;
  9. top: 0;
  10. bottom: 0;
  11. left: 50%;
  12. width: 3px;
  13. margin-left: -1.5px;
  14. background-color: #eeeeee;
  15. }
  16. .timeline > li {
  17. position: relative;
  18. margin-bottom: 20px;
  19. }
  20. .timeline > li:before,
  21. .timeline > li:after {
  22. content: " ";
  23. display: table;
  24. }
  25. .timeline > li:after {
  26. clear: both;
  27. }
  28. .timeline > li:before,
  29. .timeline > li:after {
  30. content: " ";
  31. display: table;
  32. }
  33. .timeline > li:after {
  34. clear: both;
  35. }
  36. .timeline > li > .timeline-panel {
  37. float: left;
  38. position: relative;
  39. width: 46%;
  40. padding: 20px;
  41. border: 1px solid #d4d4d4;
  42. border-radius: 2px;
  43. -webkit-box-shadow: 0 1px 6px rgba(0,0,0,0.175);
  44. box-shadow: 0 1px 6px rgba(0,0,0,0.175);
  45. }
  46. .timeline > li > .timeline-panel:before {
  47. content: " ";
  48. display: inline-block;
  49. position: absolute;
  50. top: 26px;
  51. right: -15px;
  52. border-top: 15px solid transparent;
  53. border-right: 0 solid #ccc;
  54. border-bottom: 15px solid transparent;
  55. border-left: 15px solid #ccc;
  56. }
  57. .timeline > li > .timeline-panel:after {
  58. content: " ";
  59. display: inline-block;
  60. position: absolute;
  61. top: 27px;
  62. right: -14px;
  63. border-top: 14px solid transparent;
  64. border-right: 0 solid #fff;
  65. border-bottom: 14px solid transparent;
  66. border-left: 14px solid #fff;
  67. }
  68. .timeline > li > .timeline-badge {
  69. z-index: 100;
  70. position: absolute;
  71. top: 16px;
  72. left: 50%;
  73. width: 50px;
  74. height: 50px;
  75. margin-left: -25px;
  76. border-radius: 50% 50% 50% 50%;
  77. text-align: center;
  78. font-size: 1.4em;
  79. line-height: 50px;
  80. color: #fff;
  81. background-color: #999999;
  82. }
  83. .timeline > li.timeline-inverted > .timeline-panel {
  84. float: right;
  85. }
  86. .timeline > li.timeline-inverted > .timeline-panel:before {
  87. right: auto;
  88. left: -15px;
  89. border-right-width: 15px;
  90. border-left-width: 0;
  91. }
  92. .timeline > li.timeline-inverted > .timeline-panel:after {
  93. right: auto;
  94. left: -14px;
  95. border-right-width: 14px;
  96. border-left-width: 0;
  97. }
  98. .timeline-badge.primary {
  99. background-color: #2e6da4 !important;
  100. }
  101. .timeline-badge.success {
  102. background-color: #3f903f !important;
  103. }
  104. .timeline-badge.warning {
  105. background-color: #f0ad4e !important;
  106. }
  107. .timeline-badge.danger {
  108. background-color: #d9534f !important;
  109. }
  110. .timeline-badge.info {
  111. background-color: #5bc0de !important;
  112. }
  113. .timeline-title {
  114. margin-top: 0;
  115. color: inherit;
  116. }
  117. .timeline-body > p,
  118. .timeline-body > ul {
  119. margin-bottom: 0;
  120. }
  121. .timeline-body > p + p {
  122. margin-top: 5px;
  123. }
  124. @media(max-width:767px) {
  125. ul.timeline:before {
  126. left: 40px;
  127. }
  128. ul.timeline > li > .timeline-panel {
  129. width: calc(100% - 90px);
  130. width: -moz-calc(100% - 90px);
  131. width: -webkit-calc(100% - 90px);
  132. }
  133. ul.timeline > li > .timeline-badge {
  134. top: 16px;
  135. left: 15px;
  136. margin-left: 0;
  137. }
  138. ul.timeline > li > .timeline-panel {
  139. float: right;
  140. }
  141. ul.timeline > li > .timeline-panel:before {
  142. right: auto;
  143. left: -15px;
  144. border-right-width: 15px;
  145. border-left-width: 0;
  146. }
  147. ul.timeline > li > .timeline-panel:after {
  148. right: auto;
  149. left: -14px;
  150. border-right-width: 14px;
  151. border-left-width: 0;
  152. }
  153. }