Spring Boot Web应用程序CSS样式不起作用

时间:2019-04-28 07:01:13

标签: html css spring

在我的SpringBoot Web应用程序中,我的index.jsp文件位于路径src / main / webapp / index.jsp下。

我的css文件也位于-src / main / resources / static / css / style.css

但是我的样式表不起作用...这是我的index.jsp代码...

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ include file="/views/includes.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>Index Page</title>
</head>
<body>

<button type="button" id = "btn1" class="btn btn-primary btn-lg">Large button</button>
<button type="button" id="btn1" class="btn btn-secondary btn-lg">Large button</button>

</body>
</html>

0 个答案:

没有答案