前言
本節將咱們本身的CSS樣式替換系統自帶的javascript
開始搭建
將腳本文件夾刪掉,將內容文件夾裏的內容刪掉,將咱們本身的CSS樣式文件,所有複製到內容裏邊css
新建家庭控制器
給家庭控制器添加索引視圖html
指數代碼java
@{ Layout = null; } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>BYCMS後臺管理系統</title> <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="Access-Control-Allow-Origin" content="*"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="format-detection" content="telephone=no"> <link rel="icon" href="favicon.ico"> <link rel="stylesheet" href="~/Content/layui/css/layui.css" media="all" /> <link rel="stylesheet" href="~/Content/css/index.css" media="all" /> </head> <body class="main_body"> <div class="layui-layout layui-layout-admin"> <!-- 頂部 --> <div class="layui-header header"> <div class="layui-main mag0"> <a href="#" class="logo">BYCMS</a> <!-- 顯示/隱藏菜單 --> <a href="javascript:;" class="seraph hideMenu icon-caidan"></a> <!-- 頂級菜單 --> <ul class="layui-nav mobileTopLevelMenus" mobile> <li class="layui-nav-item" data-menu="contentManagement"> <a href="javascript:;"><i class="seraph icon-caidan"></i><cite>layuiCMS</cite></a> <dl class="layui-nav-child"> <dd class="layui-this" data-menu="contentManagement"><a href="javascript:;"><i class="layui-icon" data-icon=""></i><cite>內容管理</cite></a></dd> <dd data-menu="memberCenter"><a href="javascript:;"><i class="seraph icon-icon10" data-icon="icon-icon10"></i><cite>用戶中心</cite></a></dd> <dd data-menu="systemeSttings"><a href="javascript:;"><i class="layui-icon" data-icon=""></i><cite>系統設置</cite></a></dd> <dd data-menu="seraphApi"><a href="javascript:;"><i class="layui-icon" data-icon=""></i><cite>使用文檔</cite></a></dd> </dl> </li> </ul> <ul class="layui-nav topLevelMenus" pc> <li class="layui-nav-item layui-this" data-menu="contentManagement"> <a href="javascript:;"><i class="layui-icon" data-icon=""></i><cite>內容管理</cite></a> </li> <li class="layui-nav-item" data-menu="memberCenter" pc> <a href="javascript:;"><i class="seraph icon-icon10" data-icon="icon-icon10"></i><cite>用戶中心</cite></a> </li> <li class="layui-nav-item" data-menu="systemeSttings" pc> <a href="javascript:;"><i class="layui-icon" data-icon=""></i><cite>系統設置</cite></a> </li> <li class="layui-nav-item" data-menu="seraphApi" pc> <a href="javascript:;"><i class="layui-icon" data-icon=""></i><cite>使用文檔</cite></a> </li> </ul> <!-- 頂部右側菜單 --> <ul class="layui-nav top_menu"> <li class="layui-nav-item" pc> <a href="javascript:;" class="clearCache"><i class="layui-icon" data-icon=""></i><cite>清除緩存</cite><span class="layui-badge-dot"></span></a> </li> <li class="layui-nav-item lockcms" pc> <a href="javascript:;"><i class="seraph icon-lock"></i><cite>鎖屏</cite></a> </li> <li class="layui-nav-item" id="userInfo"> <a href="javascript:;"><img src="~/Content/images/face.jpg" class="layui-nav-img userAvatar" width="35" height="35"><cite class="adminName">許伯一博客</cite></a> <dl class="layui-nav-child"> <dd><a href="javascript:;" data-url="page/user/userInfo.html"><i class="seraph icon-ziliao" data-icon="icon-ziliao"></i><cite>我的資料</cite></a></dd> <dd><a href="javascript:;" data-url="page/user/changePwd.html"><i class="seraph icon-xiugai" data-icon="icon-xiugai"></i><cite>修改密碼</cite></a></dd> <dd><a href="javascript:;" class="showNotice"><i class="layui-icon"></i><cite>系統公告</cite><span class="layui-badge-dot"></span></a></dd> <dd pc><a href="javascript:;" class="functionSetting"><i class="layui-icon"></i><cite>功能設定</cite><span class="layui-badge-dot"></span></a></dd> <dd pc><a href="javascript:;" class="changeSkin"><i class="layui-icon"></i><cite>更換皮膚</cite></a></dd> <dd><a href="page/login/login.html" class="signOut"><i class="seraph icon-tuichu"></i><cite>退出</cite></a></dd> </dl> </li> </ul> </div> </div> <!-- 左側導航 --> <div class="layui-side layui-bg-black"> <div class="user-photo"> <a class="img" title="個人頭像"><img src="~/Content/images/face.jpg" class="userAvatar"></a> <p>你好!<span class="userName">許伯一博客</span>, 歡迎登陸</p> </div> <!-- 搜索 --> <div class="layui-form component"> <select name="search" id="search" lay-search lay-filter="searchPage"> <option value="">搜索頁面或功能</option> <option value="1">layer</option> <option value="2">form</option> </select> <i class="layui-icon"></i> </div> <div class="navBar layui-side-scroll" id="navBar"> <ul class="layui-nav layui-nav-tree"> <li class="layui-nav-item layui-this"> <a href="javascript:;" data-url="page/main.html"><i class="layui-icon" data-icon=""></i><cite>後臺首頁</cite></a> </li> </ul> </div> </div> <!-- 右側內容 --> <div class="layui-body layui-form"> <div class="layui-tab mag0" lay-filter="bodyTab" id="top_tabs_box"> <ul class="layui-tab-title top_tab" id="top_tabs"> <li class="layui-this" lay-id=""><i class="layui-icon"></i> <cite>後臺首頁</cite></li> </ul> <ul class="layui-nav closeBox"> <li class="layui-nav-item"> <a href="javascript:;"><i class="layui-icon caozuo"></i> 頁面操做</a> <dl class="layui-nav-child"> <dd><a href="javascript:;" class="refresh refreshThis"><i class="layui-icon">ဂ</i> 刷新當前</a></dd> <dd><a href="javascript:;" class="closePageOther"><i class="seraph icon-prohibit"></i> 關閉其餘</a></dd> <dd><a href="javascript:;" class="closePageAll"><i class="seraph icon-guanbi"></i> 關閉所有</a></dd> </dl> </li> </ul> <div class="layui-tab-content clildFrame"> <div class="layui-tab-item layui-show"> Hello World </div> </div> </div> </div> <!-- 底部 --> <div class="layui-footer footer"> <p><span>copyright @@2019 許伯一博客</span> <a onclick="donation()" class="layui-btn layui-btn-danger layui-btn-sm">捐贈做者</a></p> </div> </div> <!-- 移動導航 --> <div class="site-tree-mobile"><i class="layui-icon"></i></div> <div class="site-mobile-shade"></div> <script type="text/javascript" src="~/Content/layui/layui.js"></script> <script type="text/javascript" src="~/Content/js/index.js"></script> <script type="text/javascript" src="~/Content/js/cache.js"></script> </body> </html>
初步效果web
終於見到點東西了,Hello World終於問世了。chrome
爲了照顧零基礎的朋友,每一步都有截圖,算是詳細的圖文教程了,日後再有一樣的步驟,就再也不單步截圖了,就要撿重點講解了緩存
原文出處:https://www.cnblogs.com/xu3784/p/10450208.htmlapp