05-29-radial-gradient-profile-box-defaults.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>My Profile</title>
  6. <style>
  7. body {
  8. margin: 0;
  9. font-family: "Helvetica Neue", Arial, sans-serif;
  10. background-color: #ddd;
  11. }
  12. .profile-box {
  13. position: relative;
  14. height: 600px;
  15. background-image: -webkit-radial-gradient(#cfdfee, #2c56a1, #cfdfee, #2c56a1, #cfdfee, #2c56a1);
  16. background-image: -moz-radial-gradient(#cfdfee, #2c56a1, #cfdfee, #2c56a1, #cfdfee, #2c56a1);
  17. background-image: -o-radial-gradient(#cfdfee, #2c56a1, #cfdfee, #2c56a1, #cfdfee, #2c56a1);
  18. background-image: radial-gradient(#cfdfee, #2c56a1, #cfdfee, #2c56a1, #cfdfee, #2c56a1);
  19. }
  20. .profile-photo {
  21. width: 160px;
  22. min-height: 200px;
  23. position: absolute;
  24. bottom: -60px;
  25. left: 5%;
  26. padding: .5em;
  27. border-radius: .5em;
  28. background-color: #fff;
  29. box-shadow: .25em .25em .5em rgba(0, 0, 0, 0.3);
  30. }
  31. .profile-photo img {
  32. display: block;
  33. max-width: 100%;
  34. height: auto;
  35. }
  36. .username {
  37. font-size: 20px;
  38. color: #666;
  39. margin: .35em 0 0;
  40. }
  41. </style>
  42. </head>
  43. <body>
  44. <header class="profile-box" role="banner">
  45. <div class="profile-photo">
  46. <img src="img/profile.jpg" alt="Charles the Cat">
  47. <h1 class="username">@CharlesTheCat</h1>
  48. </div>
  49. </header>
  50. </body>
  51. </html>