• div的作用


    <div></div>主要是用来设置涵盖一个区块为主,所谓的区块是包含一行以上的数据,所以在<div></div>的开始之前与结束后,浏览都会自动换行,所以夹在<div></div>间的数据,自然会与其前后文隔开而自成一区快

    主要设置页面的布局
    定义方位,布局
     1 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
     2 <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
     3 <%
     4 String path = request.getContextPath();
     5 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
     6 %>
     7 
     8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
     9 <html>
    10   <head>
    11     <base href="<%=basePath%>">
    12     <title><tiles:insertAttribute name="title"/></title>
    13     <link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css" />
    14     <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.2.min.js"></script>
    15 </head>
    16 <body>
    17     
    18     <tiles:insertAttribute name="header"  />
    19     <div style="position: absolute;margin-top: 88px">
    20         <tiles:insertAttribute name="menu"  />
    21     </div>
    22     <div style="position: absolute;margin-left:187px; margin-top: 88px">
    23         <tiles:insertAttribute name="content" />
    24     </div>
    25     
    26 </body>
    27 </html>
  • 相关阅读:
    LeetCode_326. Power of Three
    LeetCode_303. Range Sum Query
    LeetCode_299. Bulls and Cows
    LeetCode_292. Nim Game
    LeetCode_290. Word Pattern
    LeetCode_283. Move Zeroes
    LeetCode_278. First Bad Version
    LeetCode_268. Missing Number
    LeetCode_263. Ugly Number
    LeetCode_258. Add Digits
  • 原文地址:https://www.cnblogs.com/sharpest/p/5772851.html
Copyright © 2020-2023  润新知