horizontal-timeline.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. /* --------------------------------
  2. Main Components
  3. -------------------------------- */
  4. .cd-horizontal-timeline ol, .cd-horizontal-timeline ul {
  5. list-style: none;
  6. }
  7. .cd-timeline-navigation a:hover, .cd-timeline-navigation a:focus {
  8. border-color:#48b0f7;
  9. }
  10. .cd-horizontal-timeline a, .cd-horizontal-timeline a:hover, .cd-horizontal-timeline a:focus{ color:#48b0f7;}
  11. .cd-horizontal-timeline blockquote, .cd-horizontal-timeline q {
  12. quotes: none;
  13. }
  14. .cd-horizontal-timeline blockquote:before, .cd-horizontal-timeline blockquote:after,
  15. .cd-horizontal-timeline q:before, .cd-horizontal-timeline q:after {
  16. content: '';
  17. content: none;
  18. }
  19. .cd-horizontal-timeline table {
  20. border-collapse: collapse;
  21. border-spacing: 0;
  22. }
  23. .cd-horizontal-timeline {
  24. opacity: 0;
  25. margin: 2em auto;
  26. -webkit-transition: opacity 0.2s;
  27. -moz-transition: opacity 0.2s;
  28. transition: opacity 0.2s;
  29. width: 100%;
  30. }
  31. .cd-horizontal-timeline::before {
  32. /* never visible - this is used in jQuery to check the current MQ */
  33. content: 'mobile';
  34. display: none;
  35. }
  36. .cd-horizontal-timeline.loaded {
  37. /* show the timeline after events position has been set (using JavaScript) */
  38. opacity: 1;
  39. }
  40. .cd-horizontal-timeline .timeline {
  41. position: relative;
  42. height: 100px;
  43. width: 90%;
  44. max-width: 1200px;
  45. margin: 0 auto;
  46. }
  47. .cd-horizontal-timeline .events-wrapper {
  48. position: relative;
  49. height: 100%;
  50. margin: 0 40px;
  51. overflow: hidden;
  52. }
  53. .cd-horizontal-timeline .events-wrapper::after, .cd-horizontal-timeline .events-wrapper::before {
  54. /* these are used to create a shadow effect at the sides of the timeline */
  55. content: '';
  56. position: absolute;
  57. z-index: 2;
  58. top: 0;
  59. height: 100%;
  60. width: 20px;
  61. }
  62. .cd-horizontal-timeline .events-wrapper::before {
  63. left: 0;
  64. }
  65. .cd-horizontal-timeline .events-wrapper::after {
  66. right: 0;
  67. }
  68. .cd-horizontal-timeline .events {
  69. /* this is the grey line/timeline */
  70. position: absolute;
  71. z-index: 1;
  72. left: 0;
  73. top: 30px;
  74. height: 2px;
  75. /* width will be set using JavaScript */
  76. background: #dfdfdf;
  77. -webkit-transition: -webkit-transform 0.4s;
  78. -moz-transition: -moz-transform 0.4s;
  79. transition: transform 0.4s;
  80. }
  81. .cd-horizontal-timeline .filling-line {
  82. /* this is used to create the green line filling the timeline */
  83. position: absolute;
  84. z-index: 1;
  85. left: 0;
  86. top: 0;
  87. height: 100%;
  88. width: 100%;
  89. background-color: #48b0f7;
  90. -webkit-transform: scaleX(0);
  91. -moz-transform: scaleX(0);
  92. -ms-transform: scaleX(0);
  93. -o-transform: scaleX(0);
  94. transform: scaleX(0);
  95. -webkit-transform-origin: left center;
  96. -moz-transform-origin: left center;
  97. -ms-transform-origin: left center;
  98. -o-transform-origin: left center;
  99. transform-origin: left center;
  100. -webkit-transition: -webkit-transform 0.3s;
  101. -moz-transition: -moz-transform 0.3s;
  102. transition: transform 0.3s;
  103. }
  104. .cd-horizontal-timeline .events a {
  105. position: absolute;
  106. bottom: 0;
  107. z-index: 2;
  108. text-align: center;
  109. font-size: 1rem;
  110. padding-bottom: 15px;
  111. /* fix bug on Safari - text flickering while timeline translates */
  112. -webkit-transform: translateZ(0);
  113. -moz-transform: translateZ(0);
  114. -ms-transform: translateZ(0);
  115. -o-transform: translateZ(0);
  116. transform: translateZ(0);
  117. }
  118. .cd-horizontal-timeline .events a::after {
  119. /* this is used to create the event spot */
  120. content: '';
  121. position: absolute;
  122. left: 50%;
  123. right: auto;
  124. -webkit-transform: translateX(-50%);
  125. -moz-transform: translateX(-50%);
  126. -ms-transform: translateX(-50%);
  127. -o-transform: translateX(-50%);
  128. transform: translateX(-50%);
  129. bottom: -5px;
  130. height: 12px;
  131. width: 12px;
  132. border-radius: 50%;
  133. border: 2px solid #dfdfdf;
  134. background-color: #f8f8f8;
  135. -webkit-transition: background-color 0.3s, border-color 0.3s;
  136. -moz-transition: background-color 0.3s, border-color 0.3s;
  137. transition: background-color 0.3s, border-color 0.3s;
  138. }
  139. .no-touch .cd-horizontal-timeline .events a:hover::after {
  140. background-color: #48b0f7;
  141. border-color: #48b0f7;
  142. }
  143. .cd-horizontal-timeline .events a.selected {
  144. pointer-events: none;
  145. }
  146. .cd-horizontal-timeline .events a.selected::after {
  147. background-color: #48b0f7;
  148. border-color: #48b0f7;
  149. }
  150. .cd-horizontal-timeline .events a.older-event::after {
  151. border-color: #48b0f7;
  152. }
  153. @media only screen and (min-width: 1100px) {
  154. .cd-horizontal-timeline {
  155. margin: 6em auto;
  156. }
  157. .cd-horizontal-timeline::before {
  158. /* never visible - this is used in jQuery to check the current MQ */
  159. content: 'desktop';
  160. }
  161. }
  162. .cd-timeline-navigation a {
  163. /* these are the left/right arrows to navigate the timeline */
  164. position: absolute;
  165. z-index: 1;
  166. top: 50%;
  167. bottom: auto;
  168. -webkit-transform: translateY(-50%);
  169. -moz-transform: translateY(-50%);
  170. -ms-transform: translateY(-50%);
  171. -o-transform: translateY(-50%);
  172. transform: translateY(-50%);
  173. height: 34px;
  174. width: 34px;
  175. border-radius: 50%;
  176. border: 2px solid #dfdfdf;
  177. /* replace text with an icon */
  178. overflow: hidden;
  179. color: transparent;
  180. text-indent: 100%;
  181. white-space: nowrap;
  182. -webkit-transition: border-color 0.3s;
  183. -moz-transition: border-color 0.3s;
  184. transition: border-color 0.3s;
  185. }
  186. .cd-timeline-navigation a::after {
  187. /* arrow icon */
  188. content: '';
  189. position: absolute;
  190. height: 16px;
  191. width: 16px;
  192. left: 50%;
  193. top: 50%;
  194. bottom: auto;
  195. right: auto;
  196. -webkit-transform: translateX(-50%) translateY(-50%);
  197. -moz-transform: translateX(-50%) translateY(-50%);
  198. -ms-transform: translateX(-50%) translateY(-50%);
  199. -o-transform: translateX(-50%) translateY(-50%);
  200. transform: translateX(-50%) translateY(-50%);
  201. background: url(../img/cd-arrow.svg) no-repeat 0 0;
  202. }
  203. .cd-timeline-navigation a.prev {
  204. left: 0;
  205. -webkit-transform: translateY(-50%) rotate(180deg);
  206. -moz-transform: translateY(-50%) rotate(180deg);
  207. -ms-transform: translateY(-50%) rotate(180deg);
  208. -o-transform: translateY(-50%) rotate(180deg);
  209. transform: translateY(-50%) rotate(180deg);
  210. }
  211. .cd-timeline-navigation a.next {
  212. right: 0;
  213. }
  214. .no-touch .cd-timeline-navigation a:hover {
  215. border-color: #7b9d6f;
  216. }
  217. .cd-timeline-navigation a.inactive {
  218. cursor: not-allowed;
  219. }
  220. .cd-timeline-navigation a.inactive::after {
  221. background-position: 0 -16px;
  222. }
  223. .no-touch .cd-timeline-navigation a.inactive:hover {
  224. border-color: #dfdfdf;
  225. }
  226. .cd-horizontal-timeline .events-content {
  227. position: relative;
  228. width: 100%;
  229. margin: 2em 0;
  230. overflow: hidden;
  231. -webkit-transition: height 0.4s;
  232. -moz-transition: height 0.4s;
  233. transition: height 0.4s;
  234. }
  235. .cd-horizontal-timeline .events-content li {
  236. position: absolute;
  237. z-index: 1;
  238. width: 100%;
  239. left: 0;
  240. top: 0;
  241. -webkit-transform: translateX(-100%);
  242. -moz-transform: translateX(-100%);
  243. -ms-transform: translateX(-100%);
  244. -o-transform: translateX(-100%);
  245. transform: translateX(-100%);
  246. padding: 0 5%;
  247. opacity: 0;
  248. -webkit-animation-duration: 0.4s;
  249. -moz-animation-duration: 0.4s;
  250. animation-duration: 0.4s;
  251. -webkit-animation-timing-function: ease-in-out;
  252. -moz-animation-timing-function: ease-in-out;
  253. animation-timing-function: ease-in-out;
  254. }
  255. .cd-horizontal-timeline .events-content li.selected {
  256. /* visible event content */
  257. position: relative;
  258. z-index: 2;
  259. opacity: 1;
  260. -webkit-transform: translateX(0);
  261. -moz-transform: translateX(0);
  262. -ms-transform: translateX(0);
  263. -o-transform: translateX(0);
  264. transform: translateX(0);
  265. }
  266. .cd-horizontal-timeline .events-content li.enter-right, .cd-horizontal-timeline .events-content li.leave-right {
  267. -webkit-animation-name: cd-enter-right;
  268. -moz-animation-name: cd-enter-right;
  269. animation-name: cd-enter-right;
  270. }
  271. .cd-horizontal-timeline .events-content li.enter-left, .cd-horizontal-timeline .events-content li.leave-left {
  272. -webkit-animation-name: cd-enter-left;
  273. -moz-animation-name: cd-enter-left;
  274. animation-name: cd-enter-left;
  275. }
  276. .cd-horizontal-timeline .events-content li.leave-right, .cd-horizontal-timeline .events-content li.leave-left {
  277. -webkit-animation-direction: reverse;
  278. -moz-animation-direction: reverse;
  279. animation-direction: reverse;
  280. }
  281. .cd-horizontal-timeline .events-content li > * {
  282. max-width: 1200px;
  283. margin: 0 auto;
  284. }
  285. .cd-horizontal-timeline .events-content h2 {
  286. font-weight: 600;
  287. margin-bottom: 0px;
  288. }
  289. .cd-horizontal-timeline .events-content em {
  290. display: block;
  291. font-style: italic;
  292. margin: 10px auto;
  293. }
  294. .cd-horizontal-timeline .events-content em::before {
  295. content: '- ';
  296. }
  297. .cd-horizontal-timeline .events-content p {
  298. font-size: 16px;
  299. }
  300. .cd-horizontal-timeline .events-content em, .cd-horizontal-timeline .events-content p {
  301. line-height: 30px;
  302. }
  303. @media only screen and (min-width: 768px) {
  304. .cd-horizontal-timeline .events-content em {
  305. font-size: 2rem;
  306. }
  307. }
  308. @-webkit-keyframes cd-enter-right {
  309. 0% {
  310. opacity: 0;
  311. -webkit-transform: translateX(100%);
  312. }
  313. 100% {
  314. opacity: 1;
  315. -webkit-transform: translateX(0%);
  316. }
  317. }
  318. @-moz-keyframes cd-enter-right {
  319. 0% {
  320. opacity: 0;
  321. -moz-transform: translateX(100%);
  322. }
  323. 100% {
  324. opacity: 1;
  325. -moz-transform: translateX(0%);
  326. }
  327. }
  328. @keyframes cd-enter-right {
  329. 0% {
  330. opacity: 0;
  331. -webkit-transform: translateX(100%);
  332. -moz-transform: translateX(100%);
  333. -ms-transform: translateX(100%);
  334. -o-transform: translateX(100%);
  335. transform: translateX(100%);
  336. }
  337. 100% {
  338. opacity: 1;
  339. -webkit-transform: translateX(0%);
  340. -moz-transform: translateX(0%);
  341. -ms-transform: translateX(0%);
  342. -o-transform: translateX(0%);
  343. transform: translateX(0%);
  344. }
  345. }
  346. @-webkit-keyframes cd-enter-left {
  347. 0% {
  348. opacity: 0;
  349. -webkit-transform: translateX(-100%);
  350. }
  351. 100% {
  352. opacity: 1;
  353. -webkit-transform: translateX(0%);
  354. }
  355. }
  356. @-moz-keyframes cd-enter-left {
  357. 0% {
  358. opacity: 0;
  359. -moz-transform: translateX(-100%);
  360. }
  361. 100% {
  362. opacity: 1;
  363. -moz-transform: translateX(0%);
  364. }
  365. }
  366. @keyframes cd-enter-left {
  367. 0% {
  368. opacity: 0;
  369. -webkit-transform: translateX(-100%);
  370. -moz-transform: translateX(-100%);
  371. -ms-transform: translateX(-100%);
  372. -o-transform: translateX(-100%);
  373. transform: translateX(-100%);
  374. }
  375. 100% {
  376. opacity: 1;
  377. -webkit-transform: translateX(0%);
  378. -moz-transform: translateX(0%);
  379. -ms-transform: translateX(0%);
  380. -o-transform: translateX(0%);
  381. transform: translateX(0%);
  382. }
  383. }
  384. .timeline:before{
  385. content: " ";
  386. display:none;
  387. bottom: 0;
  388. left: 0%;
  389. width: 0px;
  390. margin-left: -1.5px;
  391. background-color: #eeeeee;
  392. }