您的位置:首页 > Web前端 > CSS

经典用CSS实现form表单布局

2008-04-30 21:06 621 查看
><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 全部选择 提示:你可先修改部分代码,再按运行]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: