twitter-bootstrap - 我可以在整个引导网络应用程序中只使用“col-sm”吗
问题描述
我一直在努力很好地理解 Bootstrap 4 断点,但我遇到了一些困难。由于该框架是为移动优先开发的,我可以只使用col-sm
还是sm
在我的整个网站项目中使用并允许设备完成其余的处理?我对何时以及如何使用和组合感到困惑xs, sm, md, lg and xl
解决方案
我可以在我的整个网站项目中只使用 col-sm 或 sm 并允许设备完成其余的处理吗?
是的,您可以在整个网站上使用 col-sm。需要注意的要点是,在 BootStrap 4 中,它们用于断点的媒体查询添加了min-width
和 not max-width
。因此,当您使用col-sm-
样式时,适用于 576 像素以上的每个屏幕。
这些是 bootstrap 分别用于 xs、sm、md、lg、xlg 的断点。
// Extra small devices (portrait phones, less than 576px)
// No media query for `xs` since this is the default in Bootstrap
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }
// Medium devices (tablets, 768px and up)
@media (min-width: 768px) { ... }
// Large devices (desktops, 992px and up)
@media (min-width: 992px) { ... }
// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }
推荐阅读
- haskell - 读取语句列表并以单个表达式结尾,when 语句可以是表达式
- debugging - PyCharm 在调试模式下说“无法显示帧变量”?(与 gevent 无关)
- python - 如何应用动态规划来计算图中的最短路径?
- google-cloud-platform - 在数据存储中创建/更新触发云功能
- python - 从一列中提取并复制以“Unit”开头的字符串到新列:Pandas
- php - 如何从 Soap Webservice 转换结果并在刀片 laravel 中显示?
- javascript - Javascript 性能分析
- elasticsearch - Knative 日志记录:log stash - Kibana 无法获取映射
- php - PHP - 在 MySQL 中插入更新删除搜索数据
- django - django 应用程序的 docker-compose up 命令后程序挂起