HomeCSS and HTML Animated Login Form Using HTML & CSS Lun Dev Friday, October 21, 2022 Facebook Twitter Animated Login Form Using HTML & CSS Design Animated Login Form with HTML & CSS by Lùn Dev.Video hướng dẩn:Truy cập youtube Lùn Dev để xem nhiều hơn Code Html Document Login Username Password Save login Login Register Username Email Password Save login Login Login Register Code CSS body{ background-image: linear-gradient(to bottom right, #BEEBF1, #F3ACCC); height:100vh; overflow: hidden; font-family: monospace; } .container{ position: absolute; top:50%; left:50%; transform: translate(-50%,-50%); width:400px; height:70vh; z-index: 1; } .container::before{ position: absolute; bottom: 50%; left:80%; width:600px; height:600px; content:''; background-image: linear-gradient(to top right, #B1BAF5, #C2ADF3); border-radius: 50%; z-index: -1; animation: backgroundanimation 6s ease-in-out 2s infinite alternate; } .container::after{ position: absolute; top: 50%; right:60%; width:400px; height:400px; content:''; background-image: linear-gradient(to top right, #B1BAF5, #C2ADF3); border-radius: 50%; z-index: -1; filter: blur(10px); animation: backgroundanimation 5s ease-in-out infinite alternate; } @keyframes backgroundanimation{ from{ transform: translate(0,0); }to{ transform: translate(0,100px); } } .form{ background-color: rgb(239, 239, 239, 0.3); width:100%; height:100%; border-radius: 30px; overflow: hidden; position: absolute; } .content{ width:80%; padding:10%; height:60%; position: absolute; margin-top:20%; } h1{ color:#fff; margin-bottom:50px; } button{ width:80%; border:none; margin-top:20px; padding:15px 0; position: absolute; bottom:0; background-image: linear-gradient(to right, #90ABF4, #E697D5); color:#fff; } .group{ height:60px; position: relative; margin-bottom: 30px; } .group label{ position:absolute; top:45px; left:10%; transition: 0.5s; } .group .inputText{ margin-top:30px; width:80%; padding: 0 10%; height:50px; border:none; outline: none; background-color: rgb(255, 255, 255, 0.6); } .inputText:focus + label, .inputText:not(:placeholder-shown) + label { top:0; left:10%; } .inputText:valid{ border-bottom:1px solid #909fee; } input[type='checkbox'] + label{ position: unset; } .form-rotate{ position: absolute; top:0; left:0; width:100%; height:100%; overflow: hidden; border-top-left-radius:30px; border-top-right-radius:30px; z-index: -1; } #rotate{ background-image: linear-gradient(to right, #909FEE, #D292F3); width:500px; height:500px; border-radius: 30% 70% 70% 30% / 30% 43% 57% 70% ; z-index: -1; position: absolute; top :-200px; left:50%; transform: translate(-50%); transition: 1s; } .option{ position: absolute; bottom:10px;width:70%; left:50%; transform: translate(-50%); } .changeType{ width:50%; float: left; display: flex; justify-content: center; align-items: center; transition:1s; height:40px; } .bg-active{ position: absolute; width:50%; left:0; transition: 1s; background-color: #909FEE; height:40px; z-index: -1; border-radius: 20px; } .changeType.active { color:#fff; } .form.login .content:nth-child(1){ z-index: 1; animation:nextContent 1s ease-in-out 1 forwards } .form.login .content:nth-child(2){ z-index: 1; animation:outContent 1s ease-in-out 1 forwards } @keyframes nextContent{ from{ transform: translate(100%,0px); }to{ transform: translate(0,0px); } } @keyframes outContent{ from{ transform: translate(0,0px); }to{ transform: translate(-100%,0px); } } .form.register .content:nth-child(2){ z-index: 1; animation:nextContent 1s ease-in-out 1 forwards } .form.register .content:nth-child(1){ z-index: 1; animation:outContent 1s ease-in-out 1 forwards } Tải code tại đây Code sẽ có sau 60 giây Tiến hành tải code Tags CSS and HTML Form Designs Javascript