css两个form不换行,两个div并排代码

Posted on 2021-02-20 15:30  风行天下-2080  阅读(209)  评论(0编辑  收藏  举报

1、

https://blog.csdn.net/dfsafsd32323/article/details/102389586?utm_medium=distribute.pc_relevant_bbs_down.none-task-blog-baidujs-2.nonecase&depth_1-utm_source=distribute.pc_relevant_bbs_down.none-task-blog-baidujs-2.nonecase

form不换行通过css实现

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
form{margin:0px; display:inline}
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <label>aaa
  <input type="text" name="textfield" />
  </label>
</form>
<form id="form2" name="form2" method="post" action="">
  <label>
  <input type="checkbox" name="checkbox" value="checkbox" />
  aaa</label>
</form>
</body>
</html>

Copyright © 2025 风行天下-2080
Powered by .NET 9.0 on Kubernetes