關於html中空格導致的排版問題,html空格導致排版

來源:互聯網
上載者:User

關於html中空格導致的排版問題,html空格導致排版

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>   <head>      <title>#{Security}</title>      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">      <meta http-equiv="X-UA-Compatible" content="IE=edge"/>   <style type="text/css">      html {         height:100%;         margin:0;      }      body {         height:95%;         margin:0;         padding-top: 30px;         padding-left: 60px;      }      select, input[type="text"] {         height: 22px;      }      #lineNum {         width: 60px;      }      .actionTable {         width: 100%;      }         </style></head><body style="margin:0; -moz-user-select:-moz-none;" onselectstart="return $.Util.isSelected(event);" >   <div style='width:850px;'>      <table class="noBorderTable actionTable">         <tr>            <td>               <label>檔案:</label>               <select id="file" name="file" style="width: 180px;">                  #{files.options}               </select>               <label>行數:</label>               <input id="lineNum" name="lineNum" type="text" value="500" style="width: 120px;" onkeyup='property(event, this);'/>               <label id="errMsg" style="color: red;"></label>               <input id="isAll" name="isAll" type="checkbox" onclick="checkAuditRefresh()" style="text-align:center; vertical-align:middle"/>               <label>全部顯示</label>               <input id="refresh" name="auto-refresh" type="checkbox"  onclick="checkAuditRefresh()" style="text-align:center; vertical-align:middle"/>               <label>自動重新整理</label>            </td>            <td style="text-align: right;">               <input type="button" id="rotate" value="分割檔案"/>               <input type="button" id="download" value="下載"/>               <input type="button" id="gainLog" value="重新整理"/>            </td>         </tr>       </table>      <div style='width:400px;margin-top:5px;'>      </div>   </div></body></html>

頁面效果

<label>行數:</label> ”寫在同一行且之間無空格,兩者之間就不會再有間隙。

結論:它們之間的間隙是因為標籤“</select>”與標籤“<label>”之間的斷行符號換行或空格導致的。

延伸:如果才能是這一地區內的空格或換行失去作用?

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.