This notification was created for level-up-challenge67 views
CSSAdd prefixes
1.notification { 2 width: 250px; 3 height: 60px; 4 color: black; 5 background: white; 6 border-radius: 3px; 7 display: grid; 8 grid-auto-flow: column; 9 align-items: center; 10 justify-items: center; 11 -webkit-animation-name: pulse; 12 animation-name: pulse; 13 -webkit-animation-duration: 1s; 14 animation-duration: 1s; 15 -webkit-animation-fill-mode: both; 16 animation-fill-mode: both; 17 animation-iteration-count: infinite; 18 border: 3px solid #ece0b4; 19} 20 21.notification:hover button.ff3 { 22 background-color: #f4e0a6; 23} 24 25.notification:hover { 26 border-color: #f4e0a6; 27} 28 29.notification:hover .lvl { 30 border-color: #f4e0a6; 31} 32 33button.ff3 { 34 background-color: #ece0b4; 35 height: 100%; 36 display: flex; 37 align-items: center; 38 width: 100%; 39 justify-content: center; 40 flex-direction: column; 41 gap: 3px; 42 cursor: pointer; 43 border: 0; 44 transition: .5s; 45 font-weight: bold; 46} 47 48.lvl { 49 background: white; 50 padding: 6px; 51 border-radius: 100px; 52 border: 3px solid #ece0b4; 53 position: absolute; 54 left: -10px; 55 transform: scale(.8); 56 top: -10px; 57} 58 59@-webkit-keyframes pulse { 60 0% { 61 -webkit-transform: scale3d(1, 1, 1); 62 transform: scale3d(1, 1, 1); 63 } 64 65 50% { 66 -webkit-transform: scale3d(1.05, 1.05, 1.05); 67 transform: scale3d(1.05, 1.05, 1.05); 68 } 69 70 100% { 71 -webkit-transform: scale3d(1, 1, 1); 72 transform: scale3d(1, 1, 1); 73 } 74} 75 76@keyframes pulse { 77 0% { 78 -webkit-transform: scale3d(1, 1, 1); 79 transform: scale3d(1, 1, 1); 80 } 81 82 50% { 83 -webkit-transform: scale3d(1.05, 1.05, 1.05); 84 transform: scale3d(1.05, 1.05, 1.05); 85 } 86 87 100% { 88 -webkit-transform: scale3d(1, 1, 1); 89 transform: scale3d(1, 1, 1); 90 } 91} 92
HTML
1<div class="notification"> <div class="txt"> Mission passed! <div class="lvl"> 10</div> </div> <button class="ff3"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 2 <path d="M15.4695 11.2929C15.0789 10.9024 14.4458 10.9024 14.0553 11.2929C13.6647 11.6834 13.6647 12.3166 14.0553 12.7071C14.4458 13.0976 15.0789 13.0976 15.4695 12.7071C15.86 12.3166 15.86 11.6834 15.4695 11.2929Z" fill="currentColor"></path> 3 <path d="M16.1766 9.17156C16.5671 8.78103 17.2003 8.78103 17.5908 9.17156C17.9813 9.56208 17.9813 10.1952 17.5908 10.5858C17.2003 10.9763 16.5671 10.9763 16.1766 10.5858C15.7861 10.1952 15.7861 9.56208 16.1766 9.17156Z" fill="currentColor"></path> 4 <path d="M19.7121 11.2929C19.3216 10.9024 18.6885 10.9024 18.2979 11.2929C17.9074 11.6834 17.9074 12.3166 18.2979 12.7071C18.6885 13.0976 19.3216 13.0976 19.7121 12.7071C20.1027 12.3166 20.1027 11.6834 19.7121 11.2929Z" fill="currentColor"></path> 5 <path d="M16.1766 13.4142C16.5671 13.0237 17.2003 13.0237 17.5908 13.4142C17.9813 13.8048 17.9813 14.4379 17.5908 14.8284C17.2003 15.219 16.5671 15.219 16.1766 14.8284C15.7861 14.4379 15.7861 13.8048 16.1766 13.4142Z" fill="currentColor"></path> 6 <path d="M6 13H4V11H6V9H8V11H10V13H8V15H6V13Z" fill="currentColor"></path> 7 <path fill-rule="evenodd" clip-rule="evenodd" d="M7 5C3.13401 5 0 8.13401 0 12C0 15.866 3.13401 19 7 19H17C20.866 19 24 15.866 24 12C24 8.13401 20.866 5 17 5H7ZM17 7H7C4.23858 7 2 9.23858 2 12C2 14.7614 4.23858 17 7 17H17C19.7614 17 22 14.7614 22 12C22 9.23858 19.7614 7 17 7Z" fill="currentColor"></path> 8</svg> Next </button> </div>