Create A Testimonials Section Using HTML CSS And JavaScript
If you want to learn how to create a Testimonials Section using HTML, CSS, and JavaScript, Then you are in the right place. This Testimonials Section is fully responsive and super easy to create. Please watch this complete article to make this awesome testimonial section.
Learn How To Create A Testimonials Section Using HTML CSS And JavaScript
Testimonials Our Leadership
*{ margin: 0px; padding: 0px; box-sizing: border-box; font-family: poppins; } ul{ list-style: none; } a{ text-decoration: none; } /* width */ .t-slider-box-text-container::-webkit-scrollbar { width: 10px; } /* Track */ .t-slider-box-text-container::-webkit-scrollbar-track { background: #f1f1f1; } /* Handle */ .t-slider-box-text-container::-webkit-scrollbar-thumb { background: #888; } /* Handle on hover */ .t-slider-box-text-container::-webkit-scrollbar-thumb:hover { background: #555; } /*==testimonials==================*/ #testimonials{ width: 100%; height: 100%; background-color: #f5f5f5; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } .testimonials-container{ max-width: 1120px; width: 90%; padding: 50px 0px; display: flex; flex-direction: column; justify-content: center; align-items: center; } .t-heading-slider{ width: 100%; } .testimonials-heading-main h4{ font-size: 4vw; color: #252525; text-align: center; font-weight: 600; } .t-heading-slider{ margin-top: 50px; } .t-heading-slider h5{ color: #252525; font-size: 32px; font-weight: 300; } .mySwipertesti{ height: 411px !important; } .t-slider-box{ display: grid; grid-template-columns: 343px 1fr; width: 100%; height: 100%; } .testimonials-slider{ width: 100%; height: 100%; margin: 20px; position: relative; } .t-slider-box-img{ display: flex; width: 100%; height: 100%; } .t-slider-box-img img{ width: 100%; height: 411px; object-fit: cover; object-position: center; } .t-slider-box-text{ padding: 0px;/*0em 2em*/ display: flex; flex-direction: column; justify-content: center; background-color: #ffffff; max-width: 0px; overflow: hidden; height: 100%; } .mySwipertesti .swiper-slide-active .t-slider-box-text{ max-width: 100%; padding: 0em 2em; animation: animation 1s; } .mySwipertesti .swiper-slide-active .t-slider-box{ width: 90%; margin-right: auto; } @keyframes animation{ 0%{ max-width: 0%; padding: 0px; } 30%{ max-width: 0%; padding: 0px; } 100%{ max-width: 100%; padding: 0em 2em; } } .t-slider-box-text h6{ font-size: 27px; color: #1f1f1f; font-weight: 500; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; } .t-slider-box-text strong{ color: #ccab99; font-size: 20px; font-weight: 500; } .t-slider-box-text-container{ display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; width: 100%; height: 230px; overflow-y: scroll; margin-top: 20px; padding-right: 15px; } .t-slider-box-text-container span{ font-size: 16px; font-style: italic; color: #000000; margin-bottom: 10px; } .t-slider-box-text-container p{ color: #313131; font-size: 16px; margin-bottom: 20px; letter-spacing: 0.2px; } .t-slider-box-text-container p:nth-child(2){ margin-top: 10px; } .t-slider-box-text-container p:last-child{ margin-bottom: 0px; } .t-slider-box-text-container p b{ font-weight: 600; } .t-slider-box-text-flow{ display: flex; flex-direction: column; } .slider-btns{ max-width: 1200px; display: flex; justify-content: space-between; position: relative; margin: auto; z-index: 110; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 100%; } .swiper-button-prev, .swiper-button-next{ position: static !important; } .swiper-button-prev{ margin-left: -50px; } .swiper-button-next{ margin-right: -50px; } .swiper-button-prev::after, .swiper-button-next::after{ color: #2b2b2b; text-shadow: 2px 2px 16px rgba(16, 92, 179, 0.22); font-size: 32px !important; } @media(max-width:810px){ .mySwipertesti{ height: 100% !important; } .t-slider-box{ display: grid; grid-template-columns:1fr; width: 100%; height:100%; } .mySwipertesti .swiper-slide-active .t-slider-box{ width: 100%; } .t-slider-box-text h6{ font-size: 23px; -webkit-line-clamp: 2; } .t-slider-box-text{ max-width: 100%; max-height: 100%; } .mySwipertesti .swiper-slide-active .t-slider-box-text{ max-height: 100%; animation: none; padding: 3em 2em; } .slider-btns{ position: static; transform: translate(0%, 0%); margin-top: 50px; justify-content: center; } .t-slider-box-text div{ display: none; animation: fade 0.3s; } @keyframes animation{ 0%{ max-height: 0%; padding: 0px; } 30%{ max-height: 0%; padding: 0px; } 100%{ max-height: 100%; padding: 3em 2em; } } .testimonials-heading-main h4{ font-size: 2rem;} .t-heading-slider h5{ font-size: 1.6rem; } .swiper-button-prev::after, .swiper-button-next::after{ font-size: 1.5rem !important; font-weight: 700; } .swiper-button-prev{ margin-left: -0px; } .swiper-button-next{ margin-right: -0px; } } .t-slider-box-text div{ display: none; animation: fade 2s; } @keyframes fade{ 0%{ opacity: 0; } 100%{ opacity: 1; } } .mySwipertesti .swiper-slide-active .t-slider-box-text div{ display: block; } .swiper-slide{ width: 100% !important; height: 100% !important; display: flex; }
Comments