展会信息港展会大全

经典 用CSS实现form表单布局
来源:互联网   发布日期:2016-03-25 16:38:36   浏览:3582次  

导读:代码如下 复制代码 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; }...

代码如下

复制代码

<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>

赞助本站

人工智能实验室

相关热词: 开发 编程 android

AiLab云推荐
推荐内容
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港