4.6K views
CSSAdd prefixes
1.card-client { 2 background: #2cb5a0; 3 width: 13rem; 4 padding-top: 25px; 5 padding-bottom: 25px; 6 padding-left: 20px; 7 padding-right: 20px; 8 border: 4px solid #7cdacc; 9 box-shadow: 0 6px 10px rgba(207, 212, 222, 1); 10 border-radius: 10px; 11 text-align: center; 12 color: #fff; 13 font-family: "Poppins", sans-serif; 14 transition: all 0.3s ease; 15} 16 17.card-client:hover { 18 transform: translateY(-10px); 19} 20 21.user-picture { 22 overflow: hidden; 23 object-fit: cover; 24 width: 5rem; 25 height: 5rem; 26 border: 4px solid #7cdacc; 27 border-radius: 999px; 28 display: flex; 29 justify-content: center; 30 align-items: center; 31 margin: auto; 32} 33 34.user-picture svg { 35 width: 2.5rem; 36 fill: currentColor; 37} 38 39.name-client { 40 margin: 0; 41 margin-top: 20px; 42 font-weight: 600; 43 font-size: 18px; 44} 45 46.name-client span { 47 display: block; 48 font-weight: 200; 49 font-size: 16px; 50} 51 52.social-media:before { 53 content: " "; 54 display: block; 55 width: 100%; 56 height: 2px; 57 margin: 20px 0; 58 background: #7cdacc; 59} 60 61.social-media a { 62 position: relative; 63 margin-right: 15px; 64 text-decoration: none; 65 color: inherit; 66} 67 68.social-media a:last-child { 69 margin-right: 0; 70} 71 72.social-media a svg { 73 width: 1.1rem; 74 fill: currentColor; 75} 76 77/*-- Tooltip Social Media --*/ 78.tooltip-social { 79 background: #262626; 80 display: block; 81 position: absolute; 82 bottom: 0; 83 left: 50%; 84 padding: 0.5rem 0.4rem; 85 border-radius: 5px; 86 font-size: 0.8rem; 87 font-weight: 600; 88 opacity: 0; 89 pointer-events: none; 90 transform: translate(-50%, -90%); 91 transition: all 0.2s ease; 92 z-index: 1; 93} 94 95.tooltip-social:after { 96 content: " "; 97 position: absolute; 98 bottom: 1px; 99 left: 50%; 100 border: solid; 101 border-width: 10px 10px 0 10px; 102 border-color: transparent; 103 transform: translate(-50%, 100%); 104} 105 106.social-media a .tooltip-social:after { 107 border-top-color: #262626; 108} 109 110.social-media a:hover .tooltip-social { 111 opacity: 1; 112 transform: translate(-50%, -130%); 113}
HTML
1<div class="card-client"> 2 <div class="user-picture"> 3 <svg viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"> 4 <path d="M224 256c70.7 0 128-57.31 128-128s-57.3-128-128-128C153.3 0 96 57.31 96 128S153.3 256 224 256zM274.7 304H173.3C77.61 304 0 381.6 0 477.3c0 19.14 15.52 34.67 34.66 34.67h378.7C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304z"></path> 5 </svg> 6 </div> 7 <p class="name-client"> Jhon Doe 8 <span>CEO of WritBook 9 </span> 10 </p> 11 <div class="social-media"> 12 <a href="#"> 13 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> 14 <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path> 15 </svg> 16 <span class="tooltip-social">Twitter</span> 17 </a> 18 <a href="#"> 19 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"> 20 <path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path> 21 </svg> 22 <span class="tooltip-social">Instagram</span> 23 </a> 24 <a href="#"> 25 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> 26 <path d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"></path> 27 </svg> 28 <span class="tooltip-social">Facebook</span> 29 </a> 30 <a href="#"> 31 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"> 32 <path d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"></path> 33 </svg> 34 <span class="tooltip-social">LinkedIn</span> 35 </a> 36 </div> 37</div>