Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. <div class="clock">
  2. <div class="clock-face">
  3. <div class="hand hour-hand"></div>
  4. <div class="hand min-hand"></div>
  5. <div class="hand second-hand"></div>
  6. </div>
  7. </div>
  8.  
  9. <style>
  10. .clock {
  11. width: 30rem;
  12. height: 30rem;
  13. border: 20px solid white;
  14. border-radius: 50%;
  15. margin: 50px auto;
  16. position: relative;
  17. padding: 2rem;
  18. box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1), inset 0 0 0 3px #efefef,
  19. inset 0 0 10px black, 0 0 10px rgba(0, 0, 0, 0.2);
  20. }
  21.  
  22. .clock-face {
  23. position: relative;
  24. width: 100%;
  25. height: 100%;
  26. }
  27.  
  28. .hand {
  29. width: 100%;
  30. height: 100%;
  31. position: absolute;
  32. }
  33.  
  34. .clock-face::after {
  35. content: '';
  36. position: absolute;
  37. width: 30px;
  38. height: 30px;
  39. background: black;
  40. border-radius: 50%;
  41. top: 50%;
  42. left: 50%;
  43. transform: translate(-50%, -50%);
  44. }
  45.  
  46. .second-hand::after {
  47. content: '';
  48. position: absolute;
  49. background: red;
  50. width: 5px;
  51. height: 50%;
  52. bottom: 50%;
  53. left: 50%;
  54. transform: translate(-50%, 0);
  55. }
  56.  
  57. .min-hand::after {
  58. content: '';
  59. position: absolute;
  60. background: white;
  61. width: 10px;
  62. height: 40%;
  63. bottom: 50%;
  64. left: 50%;
  65. transform: translate(-50%, 0);
  66. }
  67.  
  68. .hour-hand::after {
  69. content: '';
  70. position: absolute;
  71. background: white;
  72. width: 15px;
  73. height: 30%;
  74. bottom: 50%;
  75. left: 50%;
  76. transform: translate(-50%, 0);
  77. }
  78. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement