timeline.css 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. .timeline {
  2. position: relative;
  3. list-style: none;
  4. }
  5. .timeline::before {
  6. content: '';
  7. position: absolute;
  8. top: 0;
  9. bottom: 0;
  10. width: 1px;
  11. background: #dedede ;
  12. left: 50%;
  13. margin-left: -10px;
  14. }
  15. .timeline li {
  16. position: relative;
  17. opacity: 0;
  18. transition: opacity .25s ease-in-out;
  19. }
  20. .timeline li .dot {
  21. width: 12px;
  22. height: 12px;
  23. margin: 0 0 0 -15px;
  24. text-align: center;
  25. left: 50%;
  26. top: 0;
  27. position: absolute;
  28. border-radius: 10px;
  29. background: #999;
  30. }
  31. .timeline li:nth-child(odd) .content {
  32. margin: 0 0 0 53%;
  33. }
  34. .timeline li:nth-child(even) .content {
  35. position: relative;
  36. width: 44%;
  37. text-align: right;
  38. }
  39. @media screen and (max-width: 47.2em) {
  40. .timeline:before {
  41. left: 1px;
  42. }
  43. .timeline li .dot {
  44. left: 1px;
  45. }
  46. .timeline li:nth-child(odd) .content,
  47. .timeline li:nth-child(even) .content {
  48. width: 100%;
  49. position: relative;
  50. padding: 0px 10px;
  51. text-align: left;
  52. margin: 0px;
  53. right: 0px;
  54. }
  55. }
  56. .timeline li.discover-li {
  57. opacity: 1;
  58. }