12-10-alert-messages.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Visually similar alert messages</title>
  6. <style>
  7. body {
  8. font-family: Avenir Next, SegoeUI, sans-serif;
  9. }
  10. div {
  11. margin-bottom: 2em;
  12. }
  13. p {
  14. margin: 0;
  15. }
  16. div#pink-box {
  17. border-radius: .5em;
  18. padding: 1em;
  19. border: .25em solid #d9c7cc;
  20. background-color: #ffeded;
  21. color: #373334;
  22. }
  23. .warning {
  24. border-radius: .5em;
  25. padding: 1em;
  26. border: .25em solid rgba(0, 0, 0, 0.15);
  27. background-color: #ffeded;
  28. color: rgba(0, 0, 0, 0.8);
  29. }
  30. .message {
  31. border-radius: .5em;
  32. padding: 1em;
  33. border: .25em solid rgba(0, 0, 0, 0.15);
  34. background-color: #ffffed;
  35. color: rgba(0, 0, 0, 0.8);
  36. }
  37. .message-warning {
  38. background-color: #ffeded;
  39. }
  40. </style>
  41. </head>
  42. <body>
  43. <h1>Which one has the better code?</h1>
  44. <div id="pink-box">
  45. <p>This is alert message implementation one</p>
  46. </div>
  47. <div class="warning">
  48. <p>This is alert message implementation two</p>
  49. </div>
  50. <div class="message message-warning">
  51. <p>This is alert message implementation three</p>
  52. </div>
  53. </body>
  54. </html>