View的设计
_Layout视图
其他视图在代码讲解中详细贴出
1 <!DOCTYPE html> 2 <html style="width:100%;height:100%;"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta charset="utf-8" /> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <script src="~/Content/Scripts/jquery.js"></script> 8 <script src="~/Content/layui/layui.all.js"></script> 9 <script src="~/Content/layui/layui.js"></script> 10 <script src="~/Content/Scripts/jquery.validate.min.js"></script> 11 <script src="~/Content/Scripts/jquery.validate.unobtrusive.min.js"></script> 12 <script src="~/Content/Scripts/jquery.unobtrusive-ajax.min.js"></script> 13 <link href="~/Content/layui/css/layui.css" rel="stylesheet" /> 14 <title>@ViewBag.Title</title> 15 </head> 16 <body style="width: 100%; height: 100%; background-image: url(‘../../Content/Image/026.jpg‘);"> 17 <ul class="layui-nav"> 18 <li class="layui-nav-item "><a href="/Home/Index">首页</a></li> 19 <li class="layui-nav-item "> 20 <a href="/Teams/GetTeams">查看队伍</a> 21 <dl class="layui-nav-child"> 22 <dd><a href="/Teams/AddTeam">添加队伍</a></dd> 23 </dl> 24 </li> 25 <li class="layui-nav-item"> 26 <a href="javascript:;">队员管理</a> 27 <dl class="layui-nav-child"> 28 <dd><a href="/TeamMember/ChooseTeam">队员信息</a></dd> 29 <dd><a href="/TeamMember/AddTeamMember">添加队员</a></dd> 30 </dl> 31 </li> 32 <li class="layui-nav-item"><a href="/Scoreing/Index">比赛计分</a></li> 33 </ul> 34 35 36 <div style="width:1200px;height:auto; margin: auto auto; "> 37 @RenderBody() 38 </div> 39 <script> 40 layui.use(‘element‘, function () { 41 var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 42 }); 43 </script> 44 </body> 45 </html>
时间: 2024-12-24 06:17:16