CSS構造表單

來源:互聯網
上載者:User

標籤:style   blog   http   color   width   for   

結構化表單布局 

<head><meta http-equiv="Content-Type" content="text/html; charset=GBK" /><title>選擇符類型_標籤選擇符</title><style type="text/css">    #regForm fieldset {        padding:20px;;        border:0;        border-top:1px #d0d0bf solid;    }    #regForm legend {        padding:0 10px;        font-weight:bold;    }    #regForm .dataArea {        padding:3px 0;    }    #regForm .frist {        padding:8px 0 2px;    }    #regForm .subArea input {        padding:1px 4px;    }    #regForm label {        width:112px;        text-align:right;        float:left;    }</style></head><body>    <form id="regForm">        <fieldset>            <legend>登陸資訊</legend>                <div class="dataArea frist">                    <label for="username"> 使用者 名 : </label><input type="text" id="username" class="input" />                </div>                <div class="dataArea">                    <label for="password"> 密 碼 : </label><input type="text" id="password" class="input" />                </div>                <div class="dataArea">                    <label for="passwordVerify"> 確 認 密 碼 : </label><input type="text" id="passwordVerify" class="input" />                </div>        </fieldset>        <fieldset>            <legend>個人資訊</legend>                <div class="dataArea frist">                    <label for="nickname"> 昵 稱 : </label><input type="text" id="nickname" />                </div>                <div class="dataArea">                    <label for="email" class="hint"> 電子郵 件 : </label><input type="text" id="email" />                </div>                <div class="subArea">                    <input type="submit" value="註冊 " /> <input type="button" value="返回" />                </div>        </fieldset>    </form></body>

 

 

表單外邊框設定

<head><meta http-equiv="Content-Type" content="text/html; charset=GBK" /><title>選擇符類型_標籤選擇符</title><style type="text/css">    Fieldset {        Margin:0 0 10px 0;        Padding: 5px;        Border: 1px solid #333;    }    Legend {        Background-color: #ddd;        Margin:0;        Padding: 5px;        Border-style: solid;        Border-width: 1px;        Border-color: #fff #aaa #666 #fff;    }    Fieldset {        Background: #ddd;    }</style></head><body>    <form>        <fieldset>            <legend>登陸資訊</legend>                        </fieldset>     </form></body>

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.