timeline style : demo 52

CSS

(Fonts required: Niramit.)
                        :root{
                            --white: #fff;
                            --black: #222;
                            --color_1: linear-gradient(to right,#E7007B,#E7007B,#BF1424,#BF1424);
                            --color_2: linear-gradient(to right,#F04302,#F04302,#FC8819,#FC8819);
                            --color_3: linear-gradient(to right,#99C840,#99C840,#DEE420,#DEE420);
                            --color_4: linear-gradient(to right,#0994C1,#0994C1,#70B1A5,#70B1A5);
                        }
                        .main-timeline{
                            font-family: 'Niramit', sans-serif;
                            padding: 40px 0 20px;
                            margin: 20px 0;
                            position: relative;
                            z-index: 1;
                        }
                        .main-timeline:before{
                            content: '';
                            background-color: var(---white);
                            box-shadow: 0 0 5px var(---black);
                            transform: translateX(-50%);
                            width: 30%;
                            height: 100%;
                            position: absolute;
                            left: 50%;
                            top: 0;
                            z-index: -1;
                        }
                        .main-timeline:after{
                            content: '';
                            display: block;
                            clear: both;
                        }
                        .main-timeline .timeline{
                            width: 66.5%;
                            min-height: 130px;
                            margin-bottom: 20px;
                            display: block;
                            float: right;
                            position: relative;
                        }
                        .main-timeline .timeline-content{ display: block; }
                        .main-timeline .timeline-content:hover{ text-decoration: none; }
                        .main-timeline .title{
                            color: var(---white);
                            background: var(--color_1);
                            font-size: 20px;
                            font-weight: 500;
                            text-transform: uppercase;
                            letter-spacing: 1px;
                            padding: 10px 20px;
                            margin: 0;
                            display: block;
                        }
                        .main-timeline .title .timeline-year{
                            font-size: 30px;
                            font-weight: 700;
                            margin-right: 10px;
                            display: inline-block;
                        }
                        .main-timeline .inner-content{
                            color: var(--black);
                            font-size: 15px;
                            letter-spacing: 1px;
                            padding: 10px 10px 10px 400px;
                            position: relative;
                        }
                        .main-timeline .inner-content:before{
                            background: linear-gradient(45deg, transparent 49%, #BF1424 50%);
                            content: '';
                            height: 20px;
                            width: 18px;
                            position: absolute;
                            left: 0;
                            top: 0;
                            z-index: -2;
                        }
                        .main-timeline .timeline-icon{
                            color: #999;
                            font-size: 80px;
                            transform: translateY(-50%);
                            position: absolute;
                            top: 50%;
                            left: 19.5%;
                        }
                        .main-timeline .timeline:nth-child(even){ float: left; }
                        .main-timeline .timeline:nth-child(even) .title{ text-align: right; }
                        .main-timeline .timeline:nth-child(even) .inner-content{ padding: 10px 400px 10px 30px; }
                        .main-timeline .timeline:nth-child(even) .inner-content:before{
                            transform: rotateY(180deg);
                            left: auto;
                            right: 0;
                        }
                        .main-timeline .timeline:nth-child(even) .timeline-icon{
                            left: auto;
                            right: 19.5%;
                        }
                        .main-timeline .timeline:nth-child(4n+2) .title{ background: var(--color_2); }
                        .main-timeline .timeline:nth-child(4n+2) .inner-content:before{
                            background: linear-gradient(45deg, transparent 49%, #F04302 50%);
                        }
                        .main-timeline .timeline:nth-child(4n+3) .title{ background: var(--color_3); }
                        .main-timeline .timeline:nth-child(4n+3) .inner-content:before{
                            background: linear-gradient(45deg, transparent 49%, #DEE420 50%);
                        }
                        .main-timeline .timeline:nth-child(4n+4) .title{ background: var(--color_4); }
                        .main-timeline .timeline:nth-child(4n+4) .inner-content:before{
                            background: linear-gradient(45deg, transparent 49%, #0994C1 50%);
                        }
                        @media only screen and (max-width:1200px){
                            .main-timeline .inner-content{ padding: 10px 10px 10px 330px; }
                            .main-timeline .timeline:nth-child(even) .inner-content{ padding: 10px 320px 10px 25px; }
                            .main-timeline .timeline-icon{ left: 18.5%; }
                            .main-timeline .timeline:nth-child(even) .timeline-icon{ right: 18%; }
                        }
                        @media only screen and (max-width:990px){
                            .main-timeline .inner-content{ padding: 10px 10px 10px 255px; }
                            .main-timeline .timeline:nth-child(even) .inner-content{ padding: 10px 250px 10px 20px; }
                            .main-timeline .timeline-icon{ left: 17%; }
                            .main-timeline .timeline:nth-child(even) .timeline-icon{ right: 16.5%; }
                        }
                        @media only screen and (max-width:767px){
                            .main-timeline:before{
                                width: 60px;
                                left: 15px;
                                transform: translateX(0);
                            }
                            .main-timeline .timeline{ width: 100%; }
                            .main-timeline .title{
                                font-size: 18px;
                                padding: 10px;
                            }
                            .main-timeline .timeline:nth-child(even) .title{ text-align: left; }
                            .main-timeline .title .timeline-year{
                                font-size: 20px;
                                margin-right: 5px;
                            }
                            .main-timeline .inner-content,
                            .main-timeline .timeline:nth-child(even) .inner-content{
                                padding: 10px 10px 10px 90px;
                            }
                            .main-timeline .timeline:nth-child(even) .inner-content:before{
                                transform: rotateY(0);
                                left: 0;
                                right: auto;
                            }
                            .main-timeline .timeline-icon,
                            .main-timeline .timeline:nth-child(even) .inner-content .timeline-icon{
                                font-size: 40px;
                                left: 26px;
                                right: auto;
                            }
                        }
                    
License Terms