测试文件时JSP,由于对齐,我在屏幕上显示有问题:
这是我的示例文件JSP:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/includes/head.jsp"%>
<style type="text/css">
body {
background-color: rgba(26, 35, 115, 0.47);
color: #fff;
}
</style>
</head>
<body class="text-center vsc-initialized">
<%@include file="/includes/header.jsp"%>
<div class="cover-container d-flex h-100 p-3 mx-auto flex-column">
<main role="main" class="inner cover">
<h1 class="cover-heading">Welcome</h1>
<h1 class="cover-heading">to</h1>
<h1 class="cover-heading">Project Management</h1>
<h1 class="cover-heading">System</h1>
</main></div>
<%@include file="/includes/footer.jsp"%>
</body>
</html>
我需要得到这样的结果:
这样文本居中对齐,顶部没有配置标题。
CSS如果这是一个问题或JSP一般情况,任何人都可以告诉我吗?我是否需要修复某些JSP内容以获得不同的显示结果?
如果需要更多信息,我愿意更新这个问题。
我感谢这里的任何建议/想法。


问题不在于
css,而在于它的显示方式。在我更改
путь显示方法后application.properties:代替:
替换为:
相应地
JSP文件的位置而不是:在:
使用
CSS样式时的对齐问题JSP已得到修复。