Advertisement
sriyanto

mycss

Jun 2nd, 2023 (edited)
1,274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.01 KB | Source Code | 0 0
  1. @import url('https://fonts.googleapis.com/css?family=Exo:400,700');
  2. *{
  3.     margin: 0px;
  4.     padding: 0px;
  5. }
  6.  
  7. body{
  8.     font-family: 'Exo', sans-serif;
  9. }
  10.  
  11. .context {
  12.     width: 100%;
  13.     position: absolute;
  14.     top:50vh;  
  15. }
  16.  
  17. .context h1{
  18.     text-align: center;
  19.     color: #fff;
  20.     font-size: 50px;
  21. }
  22.  
  23. .area{
  24.     width: 100%;
  25.     height:100vh;
  26.     -webkit-animation:bgcolorchange 20s infinite alternate;
  27. }
  28.  
  29. .circles{
  30.     position: absolute;
  31.     top: 0;
  32.     left: 0;
  33.     width: 100%;
  34.     height: 100%;
  35.     overflow: hidden;
  36. }
  37.  
  38. .circles li{
  39.     position: absolute;
  40.     display: block;
  41.     list-style: none;
  42.     width: 20px;
  43.     height: 20px;
  44.     background: rgba(255, 255, 255, 0.2);
  45.     animation: animate 5s linear infinite;
  46.     bottom: -150px;
  47. }
  48.  
  49. .circles li:nth-child(1){
  50.     left: 25%;
  51.     width: 80px;
  52.     height: 80px;
  53.     animation-delay: 0s;
  54. }
  55.  
  56. .circles li:nth-child(2){
  57.     left: 10%;
  58.     width: 20px;
  59.     height: 20px;
  60.     animation-delay: 2s;
  61.     animation-duration: 12s;
  62. }
  63.  
  64. .circles li:nth-child(3){
  65.     left: 70%;
  66.     width: 20px;
  67.     height: 20px;
  68.     animation-delay: 4s;
  69. }
  70.  
  71. .circles li:nth-child(4){
  72.     left: 40%;
  73.     width: 60px;
  74.     height: 60px;
  75.     animation-delay: 0s;
  76.     animation-duration: 18s;
  77. }
  78.  
  79. .circles li:nth-child(5){
  80.     left: 65%;
  81.     width: 20px;
  82.     height: 20px;
  83.     animation-delay: 0s;
  84. }
  85.  
  86. .circles li:nth-child(6){
  87.     left: 75%;
  88.     width: 110px;
  89.     height: 110px;
  90.     animation-delay: 3s;
  91. }
  92.  
  93. .circles li:nth-child(7){
  94.     left: 35%;
  95.     width: 150px;
  96.     height: 150px;
  97.     animation-delay: 7s;
  98. }
  99.  
  100. .circles li:nth-child(8){
  101.     left: 50%;
  102.     width: 25px;
  103.     height: 25px;
  104.     animation-delay: 15s;
  105.     animation-duration: 45s;
  106. }
  107.  
  108. .circles li:nth-child(9){
  109.     left: 20%;
  110.     width: 45px;
  111.     height: 45px;
  112.     animation-delay: 2s;
  113.     animation-duration: 35s;
  114. }
  115.  
  116. .circles li:nth-child(10){
  117.     left: 85%;
  118.     width: 150px;
  119.     height: 150px;
  120.     animation-delay: 0s;
  121.     animation-duration: 11s;
  122. }
  123.  
  124. @keyframes animate {
  125.  
  126.     0%{
  127.         transform: translateY(0) rotate(0deg);
  128.         opacity: 1;
  129.         border-radius: 0;
  130.         background: #ffea00;      
  131.     }
  132.  
  133.     100%{
  134.         transform: translateY(-1000px) rotate(720deg);
  135.         opacity: 0;
  136.         border-radius: 50%;
  137.         background: #fdfa9b;    
  138.     }
  139. }
  140.  
  141. @-webkit-keyframes bgcolorchange {
  142.       0% {
  143.       background-color: #7904a4;
  144.       }
  145.       10% {
  146.         background-color: #8e44ad;
  147.       }
  148.       20% {  
  149.         background-color: #1abc9c;
  150.       }
  151.       30% {
  152.         background-color: #d35400;
  153.       }
  154.       40% {
  155.         background-color: blue;
  156.       }
  157.       50% {
  158.         background-color: #34495e;
  159.       }
  160.       60% {
  161.         background-color: blue;
  162.       }
  163.       70% {
  164.         background-color: #2980b9;
  165.       }
  166.       80% {
  167.         background-color: #0ef1b8;
  168.       }
  169.       90% {
  170.         background-color: #2980b9;
  171.       }
  172.       100% {
  173.         background-color: pink;
  174.       }
  175.     }
  176.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement