style.css 10.0 KB

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