• CSS实现多个Div等高,类似表格布局


    <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
    <%@ page contentType="text/html; charset=UTF-8"%>
    <%@ page import="java.net.URLEncoder;" %>
    
    <style>
    table.tableClass td{padding:8px;}
    .bgClass{background-color:#EEE;}
    </style>
    
    <s:hidden name="value.key" />
    <center class="bgClass">
    <table class="tableClass">
        <tr>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td><label>组织机构代码</label></td>
            <td>
                <s:textfield name="value.organCode" size="50" cssClass="form-control"/>
            </td>
        </tr>
        <tr>
            <td><label>法人名称</label></td>
            <td>
                <s:textfield name="value.corpName" size="50" cssClass="form-control"/>
            </td>
        </tr>
        <tr>
            <td></td>
            <td><button type="button" class="btn btn-primary btn-sm" onclick="formSubmit()">保 存</button></td>
        </tr>
    </table>
    </center>
    
    <center class="bgClass">
        <div class="equal">
            <div class="row">
                <div class="one"><label>组织机构代码</label></div>
                <div class="two"><s:textfield name="value.organCode" size="50" cssClass="form-control"/></div>
            </div>
    
            <div class="row">
                <div class="one"><label>法人名称</label></div>
                <div class="two"><s:textfield name="value.corpName" size="50" cssClass="form-control"/></div>
            </div>
            <div class="row">
                <div class="one"></div>
                <div class="four"><button type="button" class="btn btn-primary btn-sm" onclick="formSubmit()">保 存</button></div>
            </div>
        </div>
    </center>
    <style>
    .equal{display:table;border-collapse:separate;}
    .row {display:table-row;}
    .row div {display:table-cell;padding:8px;}
    .row .one {vertical-align:middle;}
    .row .two {}
    .row .three {}
    .row .four {float:left;}
    </style>
  • 相关阅读:
    如何提高沟通能力?
    如何做到科学决策?推荐你看这本《决策必读12篇》
    领导者如何让员工真心服从自己?
    MBA看什么书,MBA教材书目推荐
    有关战略管理的书,哪本最值得推荐?
    市场营销必看书籍推荐
    P1208 混合牛奶题解
    P5019 铺设道路题解
    P1728 陶陶摘苹果题解
    P1106 删数问题题解
  • 原文地址:https://www.cnblogs.com/geniussoft/p/4875324.html
Copyright © 2020-2023  润新知