个人主页登陆界面

本文介绍了如何设计个人主页的登录界面,包括使用CSS选择器定制表单提交按钮的样式,利用placeholder属性为输入框添加提示信息,从网络加载背景图片并使用background-size: cover使其铺满整个区域,以及直接设置字体颜色等技巧。
摘要由CSDN通过智能技术生成

<!DOCTYPE html>
<html>
<style type="text/css">
  body{
text-align: center;
background:url(http://dash.ga.co/assets/anna-bg.png);
background-size: cover;
color: white;
好的,我可以帮你做一个简单的个人登录界面网站。以下是一个基本的HTML和CSS代码示例: HTML代码: ```html <!DOCTYPE html> <html> <head> <title>登录</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="login-container"> <h1>登录</h1> <form> <label for="username">用户名</label> <input type="text" id="username" name="username" required> <label for="password">密码</label> <input type="password" id="password" name="password" required> <input type="submit" value="登录"> </form> </div> </body> </html> ``` CSS代码: ```css body { background-color: #f2f2f2; font-family: Arial, sans-serif; } .login-container { background-color: #fff; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); margin: 50px auto; max-width: 400px; padding: 20px; text-align: center; } h1 { margin-top: 0; } form { display: flex; flex-direction: column; } label { margin-top: 10px; } input[type="text"], input[type="password"] { border-radius: 3px; border: 1px solid #ccc; padding: 5px; } input[type="submit"] { background-color: #4CAF50; border: none; color: #fff; cursor: pointer; margin-top: 10px; padding: 10px; } input[type="submit"]:hover { background-color: #3e8e41; } ``` 这个代码将创建一个简单的登录表单,其中包括用户名和密码字段,以及一个提交按钮。你可以自行修改CSS代码,以适应你想要实现的样式。最后,你还需要编写服务器端代码来处理用户的登录请求和验证用户的凭据。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值