html登陆界面基础代码标签

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
    </head>
    <body>
        <form action="http://www.4399.com/flash/zmhj.htm" method="get">                        
        <!-- action="跳转页面到哪"  -->
        <!-- 如果希望获得最佳表单传输性能,可以采用 GET 方法发送只有少数简短字段的小表单,字数多的用post -->
            账号:<input type="text" name="um" value="" placeholder="用户名" width="600px" height="50px"><br>
            <!-- type="text"用于显示输入文本,一般用于账号输入 -->
            <!-- name="唯一代称" --><!-- placeholder输入框内的文字提醒,输入文字后消失 -->
            密码:<input type="password" name="pwd" width="600px" 50px><br>                    <!-- password密码并不显示 -->
            <input type="submit" value="登录">            <!-- submit登录按钮转入action框内的链接 -->
            <input type="reset" value="重置">            <!-- reset重置按钮,使输入的文本清空 -->
            <input type="button" value="无用按钮">        <!-- button点了没反应的按钮,可以用css定义属性 -->
            <input type="image" src="img/埃伯尔特.jpg" style="width: 30px;" maxlength="10">                <!-- 图片提交按钮 --><!-- maxlength最多输入字符 -->
        </form>
        
    </body>
</html>

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
HTML代码: <!DOCTYPE html> <html> <head> <title>登录界面</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="container"> <h1>登录</h1> <form action="login.php" method="post"> <label for="username">用户名:</label> <input type="text" id="username" name="username" required><br> <label for="password">密码:</label> <input type="password" id="password" name="password" required><br> <input type="submit" value="登录"> </form> </div> </body> </html> CSS代码(style.css): .container { width: 300px; margin: 0 auto; padding: 20px; background: #f2f2f2; border: 1px solid #ccc; border-radius: 5px; } h1 { text-align: center; color: #333; } label { display: block; margin-bottom: 5px; color: #555; } input[type="text"], input[type="password"] { width: 100%; padding: 8px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; } input[type="submit"] { width: 100%; padding: 10px; background: #4CAF50; color: #fff; border: none; border-radius: 4px; } 以上代码展示了一个基本的登录界面。在HTML中,使用form元素创建一个表单用于用户输入用户名和密码。在CSS中,设置了容器的样式,包括宽度、边距和背景颜色。使用了居中对齐的标题和标签来标识输入字段的描述。输入字段和提交按钮设置了样式,包括宽度、填充、边框和边框半径。当用户输入用户名和密码后,点击提交按钮会将数据发送到login.php处理登录逻辑。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值