以下是一个简单的JSP页面实例,演示了如何使用HTML和CSS来实现按钮居中。
步骤 1: 创建JSP文件
创建一个新的JSP文件,例如 `centeredButton.jsp`。

步骤 2: 编写HTML和CSS代码
在 `centeredButton.jsp` 文件中,编写以下代码:
```html
.center-container {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: f0f0f0;
}
.center-btn {
padding: 10px 20px;
font-size: 16px;
background-color: 4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}







