Thymeleaf非严格的html
程序员文章站
2022-05-01 22:54:21
...
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sourceforge.nekohtml/nekohtml -->
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency>
spring:
thymeleaf:
cache: false #开发时关闭缓存,不然无法看到实时页面
mode: LEGACYHHTML5 #启用非严格的html
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<body>
<div th:fragment="copyright">
© 2016 xxx
</div>
</body>
</html>
上一篇: thymeleaf语法
下一篇: 严格模式
推荐阅读
-
HTML5时代的纯前端上传图片预览及严格图片格式验证函数
-
详解HTML5 Canvas绘制不规则图形时的非零环绕原则
-
【关于W3C标准】是否必须严格遵守元素应该应用到的DTD标准?_html/css_WEB-ITnose
-
absolut绝对定位的非绝对定位用法_html/css_WEB-ITnose
-
HTML5实践-在非响应式设计中如何使用ViewPort meta标签的方法介绍
-
html5的button标签何时使用?为什么主流网站在非跳转按钮上仍然使用a标签?
-
absolut绝对定位的非绝对定位用法_html/css_WEB-ITnose
-
HTML5 或者JS可以获取移动设备信息吗?或者其他非开发语言的方法?
-
django中如何生成非HTML格式的内容。_html/css_WEB-ITnose
-
基于jQuery的让非HTML5浏览器支持placeholder属性的代码_jquery