Simple html login template

How TO — Login Form

Learn how to create a responsive login form with CSS.

Читайте также:  Cannot determine java vm executable in selected jdk

Click on the button to open the login form:

How To Create a Login Form

Step 1) Add HTML:

Add an image inside a container and add inputs (with a matching label) for each field. Wrap a element around them to process the input. You can learn more about how to process input in our PHP tutorial.

Example

Avatar
Step 2) Add CSS:

Example

/* Bordered form */
form border: 3px solid #f1f1f1;
>

/* Full-width inputs */
input[type=text], input[type=password] width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
>

/* Set a style for all buttons */
button background-color: #04AA6D;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
>

/* Add a hover effect for buttons */
button:hover opacity: 0.8;
>

/* Extra style for the cancel button (red) */
.cancelbtn width: auto;
padding: 10px 18px;
background-color: #f44336;
>

/* Center the avatar image inside this container */
.imgcontainer text-align: center;
margin: 24px 0 12px 0;
>

/* Avatar image */
img.avatar width: 40%;
border-radius: 50%;
>

/* Add padding to containers */
.container padding: 16px;
>

/* The «Forgot password» text */
span.psw float: right;
padding-top: 16px;
>

/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) span.psw display: block;
float: none;
>
.cancelbtn width: 100%;
>
>

How To Create a Modal Login Form

Step 1) Add HTML:

Example

Step 2) Add CSS:

Example

/* The Modal (background) */
.modal display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
padding-top: 60px;
>

Читайте также:  Delete this in cpp

/* Modal Content/Box */
.modal-content background-color: #fefefe;
margin: 5px auto; /* 15% from the top and centered */
border: 1px solid #888;
width: 80%; /* Could be more or less, depending on screen size */
>

/* The Close Button */
.close /* Position it in the top right corner outside of the modal */
position: absolute;
right: 25px;
top: 0;
color: #000;
font-size: 35px;
font-weight: bold;
>

/* Close button on hover */
.close:hover,
.close:focus color: red;
cursor: pointer;
>

/* Add Zoom Animation */
.animate -webkit-animation: animatezoom 0.6s;
animation: animatezoom 0.6s
>

Tip: You can also use the following javascript to close the modal by clicking outside of the modal content (and not just by using the «x» or «cancel» button to close it):

Example

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) if (event.target == modal) modal.style.display = «none»;
>
>

Tip: Go to our HTML Form Tutorial to learn more about HTML Forms.

Tip: Go to our CSS Form Tutorial to learn more about how to style form elements.

Ever heard about W3Schools Spaces? Here you can create your website from scratch or use a template, and host it for free.

Источник

36 CSS Login Forms

Discover a collection of stylish and functional CSS login forms for your website from CodePen, GitHub, and other resources. Our update includes eight new items that will enhance your website’s user experience and improve the login process.

In today’s world, where most interactions take place online, creating a user-friendly and functional login form is crucial for any website or application. In this collection, we will explore some of the best pure CSS login forms available for free on the web, along with their features and benefits. Whether you’re a web developer or designer, these login forms are sure to inspire and help you create a seamless login experience for your users.

Demo image: Hacker Login Form

  1. Bootstrap Login Forms

Author

Made with

About a code

Hacker Login Form

The Hacker Login Form is a unique and creative login form designed to resemble a hacker’s terminal. Overall, the Hacker Login Form is a fun and engaging login form that can add a unique touch to any website or application.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Finance Mobile Application-UX/UI Design Screen One

Author

Made with

About a code

Finance Mobile Application-UX/UI Design Screen One

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Login Form

Author

Made with

About a code

Login Form

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Glassmorphism Login Form

Author

Made with

About a code

Glassmorphism Login Form

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Sign Up / Login Form

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Creative and Customizable Registration Form

Author

Made with

About a code

Creative and Customizable Registration Form

The form is fully customizable, allowing you to add or remove fields as per your requirements. You can also change the color scheme and fonts to match your brand’s identity. The form is easy to use and navigate, making it a great choice for users.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: eCommerce Registraion Form

Author

Made with

About a code

eCommerce Registraion Form

The form’s modern design and responsive layout make it a great addition to any website looking to improve its user experience.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Registration Form #18

Author

Made with

About a code

Registration Form #18

A modern and stylish registration form template that can be easily customized to fit any website. With its clean design and user-friendly interface, this form is perfect for collecting user information and creating a seamless registration process. It includes fields for name, email, password, and more.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Sign Up Form #26

Author

Made with

About a code

Sign Up Form #26

A modern and stylish registration form template that can be used for various purposes. It features a clean and minimal design with a beautiful color scheme that can be customized to match your brand. The form includes fields for name, email, password, and confirmation, as well as a submit button. The template is fully responsive and can be easily integrated into your website or application.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Sign Up Form #7

Author

Made with

About a code

Sign Up Form #7

Instead of getting one free creative signup form template, this bundle offers you two lovely alternatives to play with.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Glassmorphism Login Form

Author

Made with

About a code

Glassmorphism Login Form

The form has a transparent glass-like effect with a blurred background, giving it a sleek and elegant look. The form has a username and password input field with attractive focus effect, making it easy for users to interact with.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Sign Up Modal

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: bootstrap.css, jquery.js, bootstrap.js, popper.js

Author

Made with

About the code

Double Slider Sign In/Up Form

Double slider login form in HTML, CSS and JavaScript.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Login Form

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Simple Registration Form

Simple HTML and CSS registration form with validation.

Compatible browsers: Chrome, Firefox, Opera, Safari

Author

Made with

About the code

Login Modal Form

HTML and CSS modal login form with little JavaScript.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Cube Login Form

Author

Made with

About the code

Cube Login Form

Pure CSS cube buttons and inputs for login form with gradien styles.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Login Form with Floating Labels

Author

Made with

About the code

Login Form with Floating Labels

Pure CSS login form with floating labels.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Prismatic Forms

Author

Made with

About the code

Prismatic Forms

Prismatic login, sign up and other forms.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Login Form Animation

Author

Made with

About the code

Login Form Animation

Login page animation template created with CSS3 and vanilla JavaScript DOM elements. Will surely try to upgrade it with more better animation effects.

Compatible browsers: Chrome, Firefox, Opera, Safari

Demo image: Login/Sign Up Form Animation

Author

Made with

About the code

Login/Sign Up Form Animation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Form UI Animation

Form transitions UI based on Dominik Markušić dribble.

Author

Источник

Оцените статью