当前位置:网站首页>两个div在同一行,两个div不换行「建议收藏」
两个div在同一行,两个div不换行「建议收藏」
2022-07-06 21:49:00 【全栈程序员站长】
大家好,又见面了,我是全栈君。
方法一:
<div style=”display:inline”>
<div id=”div1″ style=”float:left”>div1 content</div>
<div id=”div2″ style=”float:left”>div2 content</div>
</div>
上面的div1和div2就会在同一行显示。
。。(此方法一般都会有效的)
方法二:
<div id=”div1″ style=”float:left”>div1 content</div>
<div id=”div2″ style=”clear:both”>div2 content</div>
这样的方法有时候会不起作用,好像在引入别的js框架中使用部分会出现故障。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/116616.html原文链接:https://javaforall.cn
边栏推荐
猜你喜欢

NFT meta universe chain diversified ecosystem development case

Digital chemical plant management system based on Virtual Simulation Technology

How do test / development programmers get promoted? From nothing, from thin to thick

1.19.11. SQL client, start SQL client, execute SQL query, environment configuration file, restart policy, user-defined functions, constructor parameters

2022中青杯C题城市交通思路分析
![[written to the person who first published the paper] common problems in writing comprehensive scientific and Technological Papers](/img/7e/121b76550d2b93284e6f00740986c8.jpg)
[written to the person who first published the paper] common problems in writing comprehensive scientific and Technological Papers

【写给初发论文的人】撰写综述性科技论文常见问题

用CPU方案打破内存墙?学PayPal堆傲腾扩容量,漏查欺诈交易量可降至1/30
![[system management] clear the icon cache of deleted programs in the taskbar](/img/cc/7aff85f1a33ef390623652eadb6f03.png)
[system management] clear the icon cache of deleted programs in the taskbar

Surpassing postman, the new generation of domestic debugging tool apifox is elegant enough to use
随机推荐
Dab-detr: dynamic anchor boxes are better queries for Detr translation
Practice Guide for interface automation testing (middle): what are the interface testing scenarios
SQL where multiple field filtering
軟件測試之網站測試如何進行?測試小攻略走起!
Unit test asp Net MVC 4 Application - unit testing asp Net MVC 4 apps thoroughly
kivy教程之设置窗体大小和背景(教程含源码)
Use facet to record operation log
Comment les tests de logiciels sont - ils effectués sur le site Web? Testez la stratégie!
機器人(自動化)課程的持續學習-2022-
EasyCVR集群版本添加RTSP设备提示服务器ID错误,该如何解决?
MySQL null value processing and value replacement
golang 压缩和解压zip文件
[on automation experience] the growth path of automated testing
用CPU方案打破内存墙?学PayPal堆傲腾扩容量,漏查欺诈交易量可降至1/30
Antd comment recursive loop comment
Network Security Learning - Information Collection
Restore backup data on GCS with br
Different meat customers joined hands with Dexter to launch different hamburgers in some stores across the country
史上最全MongoDB之初识篇
Learn how to use js to merge two objects into one object assign()