4K views
CSSAdd prefixes
1.card { 2 width: 190px; 3 height: 120px; 4 transition: all .5s; 5 box-shadow: 15px 15px 30px rgba(25, 25, 25, 0.11), 6 -15px -15px 30px rgba(60, 60, 60, 0.082); 7 text-align: center; 8 overflow: hidden; 9} 10 11.card:hover { 12 height: 254px; 13 background: linear-gradient(360deg, #edededc5 60%, hsla(0, 0%, 13%, 1) 70%); 14} 15 16.card .header { 17 padding: 20px; 18 display: flex; 19 flex-direction: column; 20 align-items: center; 21 justify-content: center; 22 background: #212121; 23 margin-bottom: 16px; 24} 25 26.card .header .img-box { 27 width: 50px; 28} 29 30.card .header .title { 31 font-size: 1.1em; 32 letter-spacing: .1em; 33 font-weight: 500; 34 text-transform: uppercase; 35 padding: 4px 0 14px 0; 36 transition: all .5s; 37 color: #edededc5; 38} 39 40.card:hover .header { 41 clip-path: polygon(0 0, 100% 0, 100% 100%, 0 96%); 42} 43 44.card:hover .card .header .title { 45 padding: 0; 46} 47 48.card .content { 49 display: block; 50 text-align: justify; 51 color: #212121; 52 margin: 0 18px; 53} 54 55.card .content p { 56 transition: all .5s; 57 font-size: 1em; 58 margin-bottom: 8px; 59} 60 61.card .content a { 62 color: #1d8122; 63 cursor: pointer; 64 transition: all .5s; 65 font-size: .8rem; 66 font-weight: 500; 67 text-transform: uppercase; 68} 69 70.card .content .btn-link:hover { 71 border-bottom: 1px solid #1d8122; 72}
HTML
1<div class="card"> 2 <div class="header"> 3 <div class="img-box"> 4 <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> 5 <path d="M0 0h24v24H0z" fill="none"></path> 6 <path fill="rgba(66,193,110,1)" d="M20.083 15.2l1.202.721a.5.5 0 0 1 0 .858l-8.77 5.262a1 1 0 0 1-1.03 0l-8.77-5.262a.5.5 0 0 1 0-.858l1.202-.721L12 20.05l8.083-4.85zm0-4.7l1.202.721a.5.5 0 0 1 0 .858L12 17.65l-9.285-5.571a.5.5 0 0 1 0-.858l1.202-.721L12 15.35l8.083-4.85zm-7.569-9.191l8.771 5.262a.5.5 0 0 1 0 .858L12 13 2.715 7.429a.5.5 0 0 1 0-.858l8.77-5.262a1 1 0 0 1 1.03 0zM12 3.332L5.887 7 12 10.668 18.113 7 12 3.332z"></path> 7 </svg> 8 </div> 9 <h1 class="title">Features</h1> 10 </div> 11 12 <div class="content"> 13 <p> 14 Lorem ipsum dolor sit amet, consectetur 15 adipiscing it amet it... 16 </p> 17 18 <a class="btn-link">Read More...</a> 19 </div> 20</div>