当前位置:网站首页>两个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
边栏推荐
- [OA] excel document generator: openpyxl module
- Unit test asp Net MVC 4 Application - unit testing asp Net MVC 4 apps thoroughly
- 硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件
- 掌握软件安全测试方法秘笈,安全测试报告信手捏来
- A series of shortcut keys for jetbrain pychar
- Win11玩绝地求生(PUBG)崩溃怎么办?Win11玩绝地求生崩溃解决方法
- 【编码字体系列】OpenDyslexic字体
- Why does WordPress open so slowly?
- 軟件測試之網站測試如何進行?測試小攻略走起!
- UltraEdit-32 warm prompt: right association, cancel bak file [easy to understand]
猜你喜欢
Five years of automated testing, and finally into the ByteDance, the annual salary of 30W is not out of reach
See Gardenia minor
C#使用西门子S7 协议读写PLC DB块
On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?
In cooperation with the research team of the clinical trial center of the University of Hong Kong and Hong Kong Gangyi hospital, Kexing launched the clinical trial of Omicron specific inactivated vacc
Mathematical analysis_ Notes_ Chapter 10: integral with parameters
测试/开发程序员怎么升职?从无到有,从薄变厚.......
mpf2_线性规划_CAPM_sharpe_Arbitrage Pricin_Inversion Gauss Jordan_Statsmodel_Pulp_pLU_Cholesky_QR_Jacobi
The root file system of buildreoot prompts "depmod:applt not found"
[team learning] [34 sessions] Alibaba cloud Tianchi online programming training camp
随机推荐
Triple half circle progress bar, you can use it directly
Quick completion guide of manipulator (10): accessible workspace
[team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp
英特尔David Tuhy:英特尔傲腾技术成功的原因
2022 electrician cup question B analysis of emergency materials distribution under 5g network environment
Use facet to record operation log
2022 middle school Youth Cup mathematical modeling question B fertility policy research ideas under the background of open three children
sscanf,sscanf_s及其相关使用方法「建议收藏」
软件测试之网站测试如何进行?测试小攻略走起!
史上最全MongoDB之部署篇
The most complete security certification of mongodb in history
EasyUI export excel cannot download the method that the box pops up
超越Postman,新一代国产调试工具Apifox,用起来够优雅
图灵诞辰110周年,智能机器预言成真了吗?
Digital chemical plant management system based on Virtual Simulation Technology
vim —- 自己主动的按钮indent该命令「建议收藏」
案例大赏:英特尔携众多合作伙伴推动多领域AI产业创新发展
GPT-3当一作自己研究自己,已投稿,在线蹲一个同行评议
【ArcGIS教程】专题图制作-人口密度分布图——人口密度分析
golang 压缩和解压zip文件