用jsp写一段网站首页登录的代码包括css样式登录框背景透明
时间: 2023-01-11 13:55:36 浏览: 239
您好!下面是用 JSP 写一段网站首页登录的代码,包括 CSS 样式设置登录框背景透明的例子:
```
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>网站首页</title>
<style type="text/css">
.login-box {
background-color: transparent;
width: 300px;
padding: 20px;
border: 1px solid #ccc;
}
</style>
</head>
<body>
<div class="login-box">
<form action="/login" method="post">
<label for="username">用户名:</label>
<input type="text" name="username" id="username"><br>
<label for="password">密码:</label>
<input type="password" name="password" id="password"><br>
<input type="submit" value="登录">
</form>
</div>
</body>
</html>
```
希望这能帮到您!