利用HTML、CSS和Javascript编写一个非常简单的登录网页

 总所周知,我们在CTF中的web方向中,经常需要浏览网页的源代码,这就要求我们具备基础的HTML,CSS和Javascript的语言阅读能力,而具备这样的能力毫无疑问就需要我们去学习HTML,CSS和Javascript的基础知识,并动手编辑一个简单的网页,在代码的世界里面,动手大于一切!


<!DOCTYPE html>
<html>

<head>
    <title>Cool Login Page</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
            background: linear-gradient(to right, #00416A, #E4E5E6);
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .container {
            background-color: rgba(255, 255, 255, 0.8);
            width: 400px;
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
        }

        .container h2 {
            text-align: center;
            color: #333;
            margin-bottom: 40px;
        }

        .container input[type="text"],
        .container input[type="password"] {
            width: 100%;
            padding: 10px;
            margin-top: 10px;
            margin-bottom: 20px;
            border: none;
            border-radius: 30px;
            outline: none;
            background-color: rgba(0, 0, 0, 0.1);
            color: #333;
            font-size: 16px;
            transition: background-color 0.3s;
        }

        .container input[type="text"]:focus,
        .container input[type="password"]:focus {
            background-color: rgba(0, 0, 0, 0.2);
        }

        .container input[type="submit"] {
            width: 100%;
            padding: 15px;
            background-color: #FF4E50;
            color: white;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            font-weight: bold;
            font-size: 16px;
            transition: background-color 0.3s;
        }

        .container input[type="submit"]:hover {
            background-color: #FF6264;
        }

        .container p {
            color: #777;
            margin-top: 20px;
            font-size: 14px;
        }
    </style>
</head>

<body>
    <div class="container">
        <h2>Login</h2>
        <form>
            <input type="text" placeholder="Username" required>
            <input type="password" placeholder="Password" required>
            <input type="submit" value="Login">
            <p>Forgot your password? <a href="#">Click here</a></p>
        </form>
    </div>
</body>

</html>

下面这张图片是上面这段代码的实现的简单的登录页面。

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值