zoukankan      html  css  js  c++  java
  • thymeleaf引入公共css、js等

    <!DOCTYPE html>
    <html xmlns:th="http://www.thymeleaf.org">
    <th:block th:fragment="common_header">
        <!-- Common styles -->
        <meta charset="UTF-8">
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link rel="shortcut icon" th:href="@{/favicon.ico}" type="image/x-icon" />
        <link rel="stylesheet" th:href="@{/resource/plugin/weAdmin/static/css/font.css}">
        <link rel="stylesheet" th:href="@{/resource/plugin/weAdmin/static/css/weadmin.css}">
    </th:block>
    
    代码引公共js
    <th:block th:fragment="common_js">
    	<!-- Common scripts -->
        <script type="text/javascript" th:src="@{/resource/plugin/weAdmin/lib/layui/layui.js}" charset="utf-8"></script>
    </th:block>
    

      代码引用公共head

    <head>
    <title>haha</title>
    <th:block th:replace="common::common_header" />
    <link rel="stylesheet" th:href="@{/demo.css}" type="text/css" />
    </head>
    

      

    <th:block th:replace="common::common_js" />
    

      

  • 相关阅读:
    jQuery中 $ 符号的冲突问题
    典型用户,场景,用例图
    结对编程
    简易计算器
    对git的认识
    我的博客
    零基础免费搭建个人博客-hexo+github
    DTcmsV4.0分析学习——(3)URL重写
    DTcmsV4.0分析学习——(2)系统框架
    DTcmsV4.0分析学习——(1)数据库结构分析
  • 原文地址:https://www.cnblogs.com/amylis_chen/p/15560673.html
Copyright © 2011-2022 走看看