一、界面效果
文章來源:http://www.zghlxwxcb.cn/news/detail-412776.html
二、代碼
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登錄</title>
<style>
body {
background-color: #f1f1f1;
}
.login-box {
width: 400px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
border: none;
border-bottom: 1px solid #ccc;
outline: none;
font-size: 14px;
}
button[type="submit"] {
display: block;
width: 100%;
padding: 10px;
background-color: #4CAF50;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}
button[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<div class="login-box">
<h2>登錄</h2>
<form>
<div class="form-group">
<label for="username">用戶名:</label>
<input type="text" id="username" name="username">
</div>
<div class="form-group">
<label for="password">密碼:</label>
<input type="password" id="password" name="password">
</div>
<button type="submit">登錄</button>
</form>
</div>
</body>
</html>
留言:如果對你有幫助,給博主點(diǎn)個(gè)免費(fèi)的贊吧 ~ 創(chuàng)作不易,感謝支持!文章來源地址http://www.zghlxwxcb.cn/news/detail-412776.html
到了這里,關(guān)于html+css實(shí)現(xiàn)的登錄界面的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!