一个纯CSS写的登录的样式_html/css_WEB-ITnose
设计了一个简单的登录样式,然后自己写了下代码,巩固一下自己的状态(就使用了HTML&CSS)
先看效果:
1.HTML代码如下:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Login</title> <link rel="stylesheet" type="text/css" href="css/login.style.css"></head><body><div id="content"> <div class="login-header"> <img src="/static/imghw/default1.png" data-src="assets/images/logo" class="lazy" alt="一个纯CSS写的登录的样式_html/css_WEB-ITnose" > </div> <form> <div class="login-input-box"> <span class="icon icon-user"></span> <input type="text" placeholder="Please enter your email/phone"> </div> <div class="login-input-box"> <span class="icon icon-password"></span> <input type="password" placeholder="Please enter your password"> </div> </form> <div class="remember-box"> <label> <input type="checkbox"> Remember Me </label> </div> <div class="login-button-box"> <button>Login</button> </div> <div class="logon-box"> <a href="">Forgot?</a> <a href="">Register</a> </div></div></body></html>
2.CSS代码如下:
body{ background: url("../assets/images/bg_login.jpg") no-repeat fixed; /* set background tensile */ background-size: 100% 100%; -moz-background-size: 100% 100%; margin: 0; padding: 0;}#content{ background-color: rgba(255, 255, 255, 0.95); width: 420px; height: 300px; border: 1px solid #000000; border-radius: 6px; padding: 10px; margin-top: 15%; margin-left: auto; margin-right: auto; display: block;}.login-header{ width: 100%; height: 48px; margin-bottom: 20px; border-bottom: 1px solid #dcdcdc;}.login-header img{ width: 120px; margin-left: auto; margin-right: auto; display: block;}.login-input-box{ margin-top: 12px; width: 100%; margin-left: auto; margin-right: auto; display: inline-block;}.login-input-box input{ width: 340px; height: 32px; margin-left: 18px; border: 1px solid #dcdcdc; border-radius: 4px; padding-left: 42px;}.login-input-box input:hover{ border: 1px solid #ff7d0a;}.login-input-box input:after{ border: 1px solid #ff7d0a;}.login-input-box .icon{ width: 24px; height: 24px; margin: 6px 4px 6px 24px; background-color: #ff7d0a; display: inline-block; position: absolute; border-right: 1px solid #dcdcdc;}.login-input-box .icon.icon-user{ background: url("../assets/images/user.png");}.login-input-box .icon.icon-password{ background: url("../assets/images/password.png");}.remember-box{ width: auto; height: auto; margin-left: 18px; margin-top: 12px; font-size: 12px; color: #6a6765;}.login-button-box{ margin-top: 12px; width: 100%; margin-left: auto; margin-right: auto; display: inline-block;}.login-button-box button{ background-color: #ff7d0a; color: #ffffff; font-size: 16px; width: 386px; height: 40px; margin-left: 18px; border: 1px solid #ff7d0a; border-radius: 4px;}.login-button-box button:hover{ background-color: #ee7204;}.login-button-box button:active{ background-color: #ee7204;}.logon-box{ margin-top: 20px; text-align: center;}.logon-box a{ margin: 30px; color: #4a4744; font-size: 13px; text-decoration: none;}.logon-box a:hover{ color: #ff7d0a;}.logon-box a:active{ color: #ee7204;}
发现没法上传资源文件 -_-

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The official account web page update cache, this thing is simple and simple, and it is complicated enough to drink a pot of it. You worked hard to update the official account article, but the user still opened the old version. Who can bear the taste? In this article, let’s take a look at the twists and turns behind this and how to solve this problem gracefully. After reading it, you can easily deal with various caching problems, allowing your users to always experience the freshest content. Let’s talk about the basics first. To put it bluntly, in order to improve access speed, the browser or server stores some static resources (such as pictures, CSS, JS) or page content. Next time you access it, you can directly retrieve it from the cache without having to download it again, and it is naturally fast. But this thing is also a double-edged sword. The new version is online,

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

This article demonstrates efficient PNG border addition to webpages using CSS. It argues that CSS offers superior performance compared to JavaScript or libraries, detailing how to adjust border width, style, and color for subtle or prominent effect

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex
