![]() |
VOOZH | about |
In this article, we will learn how to make responsive sliding login and registration forms using HTML, CSS, and javascript. Forms are used on webpages for the user to enter their required details that further send to the server for processing. A form is also known as a web form or HTML form. In this article, you will learn to make a responsive sliding login and registration form using HTML, CSS, and JavaScript.
The main crux of this article is to slide form in to-for(left-right) motion when clicking the buttons and this can be done using the animate() method in JQuery which is an inbuilt method in jQuery that is used to change the state of the element with CSS style.
Syntax:
(selector).animate({styles}, para1, para2, para3);Using the animate() method in JQuery is discussed further in this article.
Example: Here is the implementation of the above-explained method.
HTML Code: First we will add HTML code to form the basic structure of the Login and Registration form.
CSS Code: Now we will add CSS code to style the forms. Comments are provided to understand the CSS code.
style.css
JavaScript Code: Finally, we will add javascript code, where we will use jQuery ( Javascript Framework) to slide the login and register form from left-right and vice versa.
Note: To use Jquery you just need to add Jquery CDN into the HTML code.