当前位置:网站首页>大div中有多个div,这些div在同一行显示,溢出后产生滚动条而不换行
大div中有多个div,这些div在同一行显示,溢出后产生滚动条而不换行
2022-07-04 17:47:00 【回忆哆啦没有A梦】
之前有一个需求,大div中有多个div,这些div在同一行显示,正常情况下,要么会溢出撑满,要么换行。但是我们如何实现溢出后产生滚动条而不换行呢?
解决办法:
<style type="text/css">
.mt {
width: 600px;
height: 200px;
overflow: auto;
}
.mk {
white-space: nowrap;
}
.mj {
width: 150px;
height: 150px;
border: 1px solid #999;
display: inline-block;
}
</style>
</head>
<body>
<div class="mt">
<div class="mk">
<div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div>
</div>
</div>
</body>
边栏推荐
- Scala基础教程--12--读写数据
- 基于C语言的菜鸟驿站管理系统
- Esp32-c3 introductory tutorial questions ⑫ - undefined reference to ROM_ temp_ to_ power, in function phy_ get_ romfunc_ addr
- 使用FTP
- ThreadLocal原理与使用
- Leetcode ransom letter C # answer
- MXNet对GoogLeNet的实现(并行连结网络)
- 神经网络物联网是什么意思通俗的解释
- 从实时应用角度谈通信总线仲裁机制和网络流控
- 2014合肥市第三十一届青少年信息学奥林匹克竞赛(小学组)试题
猜你喜欢
DeFi生态NFT流动性挖矿系统开发搭建
神经网络物联网平台搭建(物联网平台搭建实战教程)
Mxnet implementation of googlenet (parallel connection network)
My colleagues quietly told me that flying Book notification can still play like this
Scala basic tutorial -- 18 -- set (2)
基于lex和yacc的词法分析器+语法分析器
Safer, smarter and more refined, Chang'an Lumin Wanmei Hongguang Mini EV?
ByteDance dev better technology salon was successfully held, and we joined hands with Huatai to share our experience in improving the efficiency of web research and development
Deleting nodes in binary search tree
Scala基础教程--13--函数进阶
随机推荐
神经网络物联网是什么意思通俗的解释
资料下载 丨首届腾讯技术开放日课程精华!
Scala基础教程--13--函数进阶
【机器学习的数学基础】(一)线性代数(Linear Algebra)(上+)
使用canal配合rocketmq监听mysql的binlog日志
My colleagues quietly told me that flying Book notification can still play like this
Scala basic tutorial -- 15 -- recursion
[go ~ 0 to 1] read, write and create files on the sixth day
Angry bird design based on unity
Scala basic tutorial -- 19 -- actor
一种将Tree-LSTM的强化学习用于连接顺序选择的方法
Wireshark网络抓包
基于NCF的多模块协同实例
Summary and sorting of 8 pits of redis distributed lock
Caché JSON 使用JSON适配器
模板_判断素数_开方 / 六素数法
Scala basic tutorial -- 18 -- set (2)
BI技巧丨权限轴
.NET ORM框架HiSql实战-第二章-使用Hisql实现菜单管理(增删改查)
2022CoCa: Contrastive Captioners are Image-Text Fountion Models