HTML用户登录页面


<html>
 <head>
    <title>用户登录</title>
 <link type="text/css" rel="stylesheet" href="login.css"/>
 </head>
 <body>
     <fieldset id="f1">
  <legend>用户登录</legend>
  <form action="#" method=“post” id="frmlogin">
  <div>
    <label for="txtusername">用户名:</label>
     <input type="text" id="txtusername"/>
     </div>
     <div>
        <label for="txtpassword">密&nbsp;&nbsp;码:</label>
     <input type="password" id="txtpassword"/>
     </div>
     <div>
        <input type="submit" value="确定" id="btnok"/>
     <input type="reset" value="取消" id="btnEsc">
     </div>
     </form>
     </fieldset>
     <script type="text/javascript" src="login.js">
     </script>
     </body>
     </html>

转载于:https://www.cnblogs.com/liuzhuqing/archive/2010/12/09/7481266.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
HTML用户登录界面设计通常包括以下几个方面: 1. 表单元素:使用HTML的`<form>`标签创建一个表单,其中包含输入框和提交按钮等元素。可以使用`<input>`标签创建文本输入框和密码输入框,使用`<button>`标签创建提交按钮。 2. 输入验证:可以使用HTML5的表单验证属性来验证用户输入的数据,例如`required`属性可以确保输入框不能为空,`pattern`属性可以指定输入的格式等。 3. 样式设计:使用CSS来美化登录界面,可以设置背景颜色、字体样式、边框样式等。可以使用CSS的选择器来选择登录界面中的元素,并为其添加样式。 4. 响应式设计:考虑到不同设备的屏幕大小和分辨率,可以使用CSS的媒体查询来适应不同的屏幕尺寸,以确保登录界面在不同设备上都能正常显示。 下面是一个简单的HTML用户登录界面设计示例: ```html <!DOCTYPE html> <html> <head> <title>用户登录</title> <style> body { background-color: #f2f2f2; font-family: Arial, sans-serif; } .container { max-width: 400px; margin: 0 auto; padding: 20px; background-color: #fff; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } .container h2 { text-align: center; margin-bottom: 20px; } .container input[type="text"], .container input[type="password"] { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 3px; } .container button { width: 100%; padding: 10px; background-color: #4CAF50; color: #fff; border: none; border-radius: 3px; cursor: pointer; } .container button:hover { background-color: #45a049; } </style> </head> <body> <div class="container"> <h2>用户登录</h2> <form> <input type="text" placeholder="用户名" required> <input type="password" placeholder="密码" required> <button type="submit">登录</button> </form> </div> </body> </html> ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值