Advertisement
Guest User

test tube and ph strip

a guest
Feb 3rd, 2025
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>pH Strip Animation</title>
  7. <style>
  8. body {
  9. display: flex;
  10. justify-content: center;
  11. align-items: center;
  12. height: 100vh;
  13. background-color: #eef;
  14. }
  15.  
  16. .container {
  17. position: relative;
  18. width: 100px;
  19. height: 250px;
  20. }
  21.  
  22. .test-tube {
  23. position: absolute;
  24. bottom: 0;
  25. width: 60px;
  26. height: 150px;
  27. background: linear-gradient(to bottom, transparent 10%, #99d 30%, #339 100%);
  28. border: 3px solid #555;
  29. border-radius: 20px;
  30. display: flex;
  31. justify-content: center;
  32. align-items: flex-end;
  33. overflow: hidden;
  34. }
  35.  
  36. .liquid {
  37. width: 100%;
  38. height: 70%;
  39. background: #339;
  40. border-radius: 0 0 20px 20px;
  41. transition: background-color 1s ease-in-out;
  42. }
  43.  
  44. .ph-strip {
  45. position: absolute;
  46. top: -50px;
  47. left: 50%;
  48. width: 20px;
  49. height: 80px;
  50. background: #f5e663;
  51. border: 2px solid #ccc;
  52. transform: translateX(-50%);
  53. animation: dipAnimation 4s infinite ease-in-out;
  54. }
  55.  
  56. @keyframes dipAnimation {
  57. 0%, 100% {
  58. top: -50px;
  59. background: #f5e663;
  60. }
  61. 50% {
  62. top: 80px;
  63. background: #ff5733;
  64. }
  65. }
  66. </style>
  67. </head>
  68. <body>
  69. <div class="container">
  70. <div class="ph-strip"></div>
  71. <div class="test-tube">
  72. <div class="liquid"></div>
  73. </div>
  74. </div>
  75. </body>
  76. </html>
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement