总所周知,我们在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>
下面这张图片是上面这段代码的实现的简单的登录页面。