timeline.css 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. /* --------------------------------
  2. All the CSS needed for the timeline!
  3. -------------------------------- */
  4. /* --------------------------------
  5. Paddings and margins
  6. -------------------------------- */
  7. .marginBottom0 {
  8. margin-bottom: 0;
  9. }
  10. .marginTop0 {
  11. margin-top: 0;
  12. }
  13. .marginTop5 {
  14. margin-top: 5px !important;
  15. }
  16. /* --------------------------------
  17. Modules - reusable parts of our design
  18. -------------------------------- */
  19. .cd-container {
  20. /* this class is used to give a max-width to the element it is applied to, and center it horizontally when it reaches that max-width */
  21. width: 93%;
  22. max-width: 1170px;
  23. margin: 0 auto;
  24. }
  25. .cd-container::after {
  26. /* clearfix */
  27. content: '';
  28. display: table;
  29. clear: both;
  30. }
  31. /* --------------------------------
  32. Main components
  33. -------------------------------- */
  34. .timelineText {
  35. color: black;
  36. }
  37. .timelineIcon {
  38. font-size: 25px;
  39. color: white;
  40. }
  41. .cd-author {
  42. color: gray;
  43. /*margin-right: 0px;*/
  44. float:right;
  45. }
  46. #cd-timeline {
  47. position: relative;
  48. margin-top: 2em;
  49. margin-bottom: 2em;
  50. margin-left: 10px !important;
  51. }
  52. #cd-timeline::before {
  53. /* this is the vertical line */
  54. content: '';
  55. position: absolute;
  56. top: 0;
  57. left: 18px;
  58. height: 100%;
  59. width: 2px;
  60. background: #f0f0f0;
  61. }
  62. .cd-timeline-block {
  63. position: relative;
  64. margin: 2em 0;
  65. }
  66. .cd-timeline-block:after {
  67. content: "";
  68. display: table;
  69. clear: both;
  70. }
  71. .cd-timeline-block:first-child {
  72. margin-top: 0;
  73. }
  74. .cd-timeline-block:last-child {
  75. margin-bottom: 0;
  76. }
  77. .cd-timeline-icon {
  78. position: absolute;
  79. top: 0;
  80. left: 0;
  81. width: 40px;
  82. height: 40px;
  83. border-radius: 50%;
  84. border-color: #4a87ee;
  85. border-style: solid;
  86. border-width: 2px;
  87. padding-top: 5px;
  88. background: white;
  89. text-align: center;
  90. }
  91. .cd-timeline-icon i {
  92. color: #4a87ee;
  93. }
  94. .cd-timeline-picture {
  95. position: absolute;
  96. top: 0;
  97. left: 0;
  98. width: 40px;
  99. height: 40px;
  100. border-radius: 50%;
  101. border-color: #f0f0f0;
  102. border-style: solid;
  103. border-width: 1px;
  104. background: white;
  105. }
  106. .cd-timeline-picture img {
  107. display: block;
  108. width: 100%;
  109. height: 100%;
  110. position: absolute;
  111. border-radius: 50%;
  112. }
  113. .cd-timeline-content {
  114. position: relative;
  115. margin-left: 60px;
  116. background: white;
  117. border-radius: 0.25em;
  118. border-color: #ddd;
  119. border-style: solid;
  120. border-width: 1px;
  121. margin-bottom: 16px;
  122. padding: 10px;
  123. padding-bottom: 6px;
  124. }
  125. .cd-timeline-content:after {
  126. content: "";
  127. display: table;
  128. clear: both;
  129. }
  130. .cd-timeline-content h2 {
  131. color: #303e49;
  132. }
  133. .cd-timeline-content i {
  134. font-size: 20px;
  135. padding-right: 4px;
  136. }
  137. .cd-timeline-content p,
  138. .cd-timeline-content .cd-read-more,
  139. .cd-timeline-content .cd-date {
  140. font-size: 13px;
  141. font-size: 0.8125rem;
  142. }
  143. .cd-timeline-content .cd-read-more,
  144. .cd-timeline-content .cd-date {
  145. display: inline-block;
  146. }
  147. .cd-timeline-content p {
  148. margin: 0.2em 0;
  149. line-height: 1.6;
  150. }
  151. .cd-timeline-content::before {
  152. content: '';
  153. position: absolute;
  154. right: 100%;
  155. height: 0;
  156. width: 0;
  157. border: 7px solid transparent;
  158. border-right: 7px solid white;
  159. border-right-color: inherit;
  160. }
  161. @media only screen and (min-width: 768px) {
  162. .cd-timeline-content h2 {
  163. font-size: 20px;
  164. font-size: 1.25rem;
  165. }
  166. .cd-timeline-content p {
  167. font-size: 16px;
  168. font-size: 1rem;
  169. }
  170. .cd-timeline-content .cd-read-more,
  171. .cd-timeline-content .cd-date {
  172. font-size: 14px;
  173. font-size: 0.875rem;
  174. }
  175. }
  176. /*各个部分样式*/
  177. @charset "utf-8";
  178. .timeline {
  179. width: 100%;
  180. height: auto;
  181. /*margin: 20px auto;*/
  182. padding-bottom: 1rem;
  183. text-align: center;
  184. font-size: 0;
  185. }
  186. .timeline li {
  187. position: relative;
  188. display: inline-block;
  189. *display: inline;
  190. zoom: 1;
  191. width: auto;
  192. font-size: 1.2rem;
  193. padding: 1rem 1rem 1.4rem 1rem;
  194. }
  195. .timeline li .time:before {
  196. content: '';
  197. display: block;
  198. position: absolute;
  199. width: 10px;
  200. height: 10px;
  201. bottom: 0;
  202. margin-bottom: -4px;
  203. left: 50%;
  204. margin-left: -5px;
  205. background: #D7BB67;
  206. -moz-border-radius: 100%;
  207. -webkit-border-radius: 100%;
  208. border-radius: 100%;
  209. background-size: 10px 10px;
  210. }
  211. .timeline li .time:after {
  212. content: '';
  213. display: block;
  214. position: absolute;
  215. width: 100%;
  216. height: 2px;
  217. background: #D7BB67;
  218. left: 0;
  219. bottom: 0;
  220. margin-left: -2px;
  221. }
  222. .timeline img{
  223. width:40px;
  224. height:40px;
  225. position:relative;
  226. top:75px;
  227. z-index: 2;
  228. }