文章目錄
- 一、實作界面
- 二、代碼
-
- 1.denglu.html
- 二、land.css
- 總結
一、實作界面
二、代碼
1.denglu.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="land.css">
<title>Title</title>
</head>
<body>
<div class="login-container">
<div class="left-container">
<div class="title"><span>登陸</span></div>
<div class="input-container">
<input type="text" name="username" placeholder="使用者名">
<input type="password" name="password" placeholder="密碼">
</div>
<div class="message-container">
<span>忘記密碼</span>
</div>
</div>
<div class="right-container">
<div class="regist-container">
<span class="regist">注冊</span>
</div>
<div class="action-container">
<span>送出</span>
</div>
</div>
</div>
</body>
</html>
二、land.css
*{
padding:0;
margin:0;
}
html{
height:100%;
}
body{
background-image: linear-gradient(to bottom right,rgb(114,135,254),rgb(130,88,186));
}
body .login-container{
width: 600px;
height: 315px;
margin-left:600px;
margin-top:10%;
border-radius:15px;
box-shadow:0 10px 50px 0 rgb(59,45,159);
background-color: rgb(95,76,194);
}
body .login-container .left-container {
display: inline-block;
width: 330px;
border-top-left-radius: 15px;
border-bottom-left-radius:15px;
padding: 60px;
background-image: linear-gradient(to bottom right, rgb(118, 76, 163), rgb(92, 103, 211));
}
body .login-container .left-container .title{
color:#fff;
font-size:18px;
}
body .login-container .left-container .title .span{
border-bottom:3px solid rgb(237,221,22);
}
body .login-container .left-container .input-container{
padding: 20px 0;
}
body .login-container .left-container .input-container input {
border: 0;
background: none;
outline: 0;
color:#fff;
margin:20px 0;
display:block;
width: 100%;
padding:5px 0;
border-bottom:1px solid rgb(199,191,219)
}
body .login-container .left-container .input-container input:hover{
border-bottom-color:#fff;
}
::-webkit-input-placeholder{
color:rgb(199,191,219)
}
body .login-container .left-container .message-container {
font-size: 14px;
transition: .2s;
color: rgb(199, 191, 219);
cursor:pointer;
}
body .login-container .left-container .message-container:hover{
color:#fff;
}
body .login-container .right-container{
width: 145px;
display:inline-block;
height: 200px;
vertical-align:top;
padding:60px 0;
}
body .login-container .right-container .regist-container{
text-align:center;
color:#fff;
font-size:18px;
font-weight:200;
}
body .login-container .right-container .regist-container span{
border-bottom:3px solid/* rgb(237,221,22)*/#fff;
}
body .login-container .right-container .action-container {
font-size: 10px;
color: #fff;
height: 100%;
position:relative;
}
body .login-container .right-container .action-container span {
border: 1px solid /*rgb(237, 221, 22)*/#fff;
padding: 10px;
display: inline;
line-height: 25px;
border-radius: 25px;
position:absolute;
bottom:10px;
left: 47px;
transition:.2s;
cursor:pointer;
}
body .login-container .right-container .action-container span:hover {
background-color: /*rgb(237, 221, 22)*/#fff;
color:rgb(95,76,194)
}
總結
超級簡單的html頁面趕緊動手嘗試一下吧!!!