1.5K views
CSSAdd prefixes
1.container { 2 height: 300px; 3 width: 300px; 4 border-radius: 10px; 5 box-shadow: 4px 4px 30px rgba(0, 0, 0, .2); 6 display: flex; 7 flex-direction: column; 8 align-items: center; 9 justify-content: space-between; 10 padding: 10px; 11 gap: 5px; 12 background-color: rgba(0, 110, 255, 0.041); 13} 14 15.header { 16 flex: 1; 17 width: 100%; 18 border: 2px dashed royalblue; 19 border-radius: 10px; 20 display: flex; 21 align-items: center; 22 justify-content: center; 23 flex-direction: column; 24} 25 26.header svg { 27 height: 100px; 28} 29 30.header p { 31 text-align: center; 32 color: black; 33} 34 35.footer { 36 background-color: rgba(0, 110, 255, 0.075); 37 width: 100%; 38 height: 40px; 39 padding: 8px; 40 border-radius: 10px; 41 cursor: pointer; 42 display: flex; 43 align-items: center; 44 justify-content: flex-end; 45 color: black; 46 border: none; 47} 48 49.footer svg { 50 height: 130%; 51 fill: royalblue; 52 background-color: rgba(70, 66, 66, 0.103); 53 border-radius: 50%; 54 padding: 2px; 55 cursor: pointer; 56 box-shadow: 0 2px 30px rgba(0, 0, 0, 0.205); 57} 58 59.footer p { 60 flex: 1; 61 text-align: center; 62} 63 64#file { 65 display: none; 66}
HTML
1<div class="container"> 2 <div class="header"> 3 <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> 4 <path d="M7 10V9C7 6.23858 9.23858 4 12 4C14.7614 4 17 6.23858 17 9V10C19.2091 10 21 11.7909 21 14C21 15.4806 20.1956 16.8084 19 17.5M7 10C4.79086 10 3 11.7909 3 14C3 15.4806 3.8044 16.8084 5 17.5M7 10C7.43285 10 7.84965 10.0688 8.24006 10.1959M12 12V21M12 12L15 15M12 12L9 15" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg> <p>Browse File to upload!</p> 5 </div> 6 <label for="file" class="footer"> 7 <svg fill="#000000" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M15.331 6H8.5v20h15V14.154h-8.169z"></path><path d="M18.153 6h-.009v5.342H23.5v-.002z"></path></g></svg> 8 <p>Not selected file</p> 9 <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M5.16565 10.1534C5.07629 8.99181 5.99473 8 7.15975 8H16.8402C18.0053 8 18.9237 8.9918 18.8344 10.1534L18.142 19.1534C18.0619 20.1954 17.193 21 16.1479 21H7.85206C6.80699 21 5.93811 20.1954 5.85795 19.1534L5.16565 10.1534Z" stroke="#000000" stroke-width="2"></path> <path d="M19.5 5H4.5" stroke="#000000" stroke-width="2" stroke-linecap="round"></path> <path d="M10 3C10 2.44772 10.4477 2 11 2H13C13.5523 2 14 2.44772 14 3V5H10V3Z" stroke="#000000" stroke-width="2"></path> </g></svg> 10 </label> 11 <input id="file" type="file"> 12</div>