首页 > 解决方案 > 在移动视图的滑块中转换两列布局

问题描述

在我的项目中,我正在处理两列布局,例如 col-lg-8 col-lg-4 或 col-lg-6 col-lg-6 但我希望它在移动视图中打开时会在滑块中转换什么是最好的解决方案为移动视图或任何最佳方式制作单独的部分

请帮我

标签: javascriptjqueryhtmlcss

解决方案


您需要考虑使用媒体查询。这些将允许您根据屏幕的宽度和高度进行设计。

/* 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) {

}

媒体查询


推荐阅读