Fork me on GitHub
如果对您有帮助,麻烦您点赞留言吧~~~

【前端】表单自适应

写前端页面的时候难免遇到表单的样式自适应,文字+input,文字数量又不确定,表单还要自适应某个div的宽度

表单1

表单2


<style>
	.col{ width: 48%; height: 34px; float: left; }
	.label{ float: left; line-height: 34px; text-align: right; width: 90px; }
	.input{ margin-left: 90px; }
	.input input{ width: 100%; box-sizing: border-box; height: 34px; border: 1px solid #ccc; border-radius: 3px; }
</style>
<div>
	<div class="col">
		<span class="label">姓名:</span>
		<div class="input">
			<input type="text">
		</div>
	</div>
	<div class="col">
		<span class="label">身份证号码:</span>
		<div class="input">
			<input type="text">
		</div>
	</div>
</div>

posted @ 2018-09-20 21:47  jarjune  阅读(1882)  评论(0编辑  收藏  举报