經典 用CSS實現form表單布局

來源:互聯網
上載者:User
css

<style type="text/css">label{float: left;width: 80px;}form{margin:0px}input{width: 180px;border:1px solid #808080}textarea{width: 250px;height: 150px;}#sbutton{margin-left: 80px;margin-top: 5px;width:80px;}br{clear: left;}</style><form action="" method="post"><label for="user">姓名:</label><input type="text" id=user name="user" value="" /><br /><label for="email">郵件:</label><input type="text" id=email name="email" value="" /><br /><label for="comment">備忘:</label><textarea id=comment name="comment"></textarea><br /><input type="submit" id="sbutton" value="確定" /><br /></form>

    [Ctrl+A 全部選擇 提示:你可先修改部分代碼,再按運行]

相關文章

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.