알림 디자인-1 (notification Design-1 with CSS)
알림 창을 띄워 다른화면으로 이동시키는 용도로 활용할 수 있다.
✔️ HTML
1 2 3 4 5 6 7 8
| <div class="notification"> <span class="material-icons-outlined icon">info</span> <div class="messages"> <div class="title">Info</div> <div class="sub">Add your info message here.</div> </div> <a class="button" href="javascript:;">Next</a> </div>
|
✔️ CSS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| .notification { display: inline-flex; padding: 10px 20px; background: #fff; border-radius: 10px; justify-content: space-between; color: #212121; gap: 15px; box-shadow: 0px 10px 20px 13px rgba(0,0,0,0.1); animation: scale .5s linear alternate-reverse infinite; text-align: left; } @keyframes scale { from { transform: scale(0.98); }
to { transform: scale(1); } } .notification .icon { font-size: 40px; line-height: 65px; color: #303f9f; } .notification .messages { display: inline-flex; flex-direction: column; justify-content: center; } .notification .messages .title { font-size: 16px; font-family: 'NotoSansKR-Medium'; text-transform: uppercase; color: #494949; } .notification .messages .sub { font-size: 13px; } .notification .button { line-height: 65px; padding: 0px 15px; font-size: 15px; text-align: center; background-color: #303f9f; color: #ffffff; text-transform: uppercase; border-radius: 10px; text-decoration: none; } .notification .button:hover { background-color: #1a237e; font-family: 'NotoSansKR-Medium'; } @media all and (max-width: 350px) { .notification .messages .sub { display: none; } }
|
✔️ GitHub
링크