javascript - 在移动视图的滑块中转换两列布局
问题描述
在我的项目中,我正在处理两列布局,例如 col-lg-8 col-lg-4 或 col-lg-6 col-lg-6 但我希望它在移动视图中打开时会在滑块中转换什么是最好的解决方案为移动视图或任何最佳方式制作单独的部分
请帮我
解决方案
您需要考虑使用媒体查询。这些将允许您根据屏幕的宽度和高度进行设计。
/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px) {
}
/* Medium Devices, Desktops */
@media only screen and (max-width : 992px) {
}
/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
}
/* Extra Small Devices, Phones */
@media only screen and (max-width : 480px) {
}
/* Custom, iPhone Retina */
@media only screen and (max-width : 320px) {
}
推荐阅读
- python - Django DetailView 模板未显示详细信息
- amazon-web-services - AWS S3 的 put 对象的 getSignedUrl 返回 403
- angular - 如何从异步函数更新 HTML?
- java - 如何在excel中获取所选字符串的行、列坐标
- performance - Elasticsearch 索引策略创建最佳实践/性能
- react-native - 从 react-navigation v5 扩展默认 Header
- javascript - 如何从组件的映射变量创建reducer和action
- java - 有没有办法阻止 Apache CloseableHttpClient 抛出 HttpResponseException?
- javascript - Mongoose 使用数组查询 FindOne
- php - 使用按钮从数据库中删除没有任何影响?