html语言怎么设置设置表格行高?

html语言怎么设置设置表格行高?,第1张

需要准备的材料分别有:电脑、浏览器、html编辑器

1、首先,打开html编辑器,新建html文件,例如:index.html,编写问题基础代码。

2、在index.html中的<tr>标签中,输入样式代码:style="height:100px"。

3、浏览器运行index.html页面,此时表格的行高成功被设置为了100px。

<table id="InvoiceMessage" class="easyui-datagrid" style="width:240pxheight:auto" title="信息" data-options="url:'datagrid_data.json',fitColumns:true,singleSelect:true,showHeader:false">  

                <thead>  

                    <tr>  

                        <th field="name1" width="80"></th>

                        <th field="name2" width="150"></th>

                    </tr>  

                </thead>                             

                <tbody>

                    <tr>

                        <td>起始号:</td>

                        <td><input type="text" name="qc_invoice_no_begin" id="qc_invoice_no_begin" value=""/></td>              

                    </tr>

                    <tr>

                        <td>结束号:</td>

                        <td><input type="text" name="qc_invoice_no_end" id="qc_invoice_no_end" value=""/></td>              

                    </tr>

                    <tr>

                        <td>当前号:</td>              

                        <td><input type="text" name="qc_invoice_no_current" id="qc_invoice_no_current" value=""/></td>              

                    </tr>

                </tbody>

            </table>

.datagrid-row {

        height: 32px

    }

修改这个css,默认25px是太小了点

决方案--------------------

是table的高度12cm吧? 参考:

<style>

tr{height:1cm}

td{font-size:22pxpadding:5pxpadding-top:10px}

</style>

<table cellspacing= "0 ">

<tr>

<td>XXXX </td>

</tr>


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/bake/11535087.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-16
下一篇 2023-05-16

发表评论

登录后才能评论

评论列表(0条)

保存