HTML & CSS / Counter / Counter1
Couters
-
STEPS
1. html
29Nila
2. css
:root{ --main-color: #01A99E; } .counter{ color: #fff; background-color: var(--main-color); font-family: 'Raleway', sans-serif; width: 210px; padding: 30px 40px 30px 20px; margin: 0 auto; position: relative; z-index: 1; clip-path: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%); } .counter:before, .counter:after{ content: ''; background-color: var(--main-color); height: 100%; width: 100%; position: absolute; left: 0; top: 0; z-index: -1; clip-path: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%); } .counter:before{ background-color: #fff; width: calc(100% - 15px); } .counter:after{ width: calc(100% - 30px); } .counter .counter-icon{ font-size: 35px; margin: 0 0 10px; } .counter h3{ font-size: 15px; font-weight: 600; letter-spacing: 0.5px; text-transform: capitalize; margin: 0 0 5px; } .counter .counter-value{ font-size: 35px; font-weight: 600; } .counter.yellow{ --main-color: #da8c34; } .counter.pink{ --main-color: #e84393; } .counter.green{ --main-color: #71bd55; } @media screen and (max-width:990px){ .counter{ margin-bottom: 40px; } } 3. script