twitter-bootstrap – 如何删除响应功能在Twitter Bootstrap 3?
发布时间:2020-12-17 23:42:07 所属栏目:安全 来源:网络整理
导读:自Bootstrap 3以来,不再有响应式和标准样式表的独立文件。那么如何轻松地删除响应功能? 解决方法 要禁用非桌面样式,您只需要更改variables.less文件中的4行代码。在variables.less文件中设置屏幕宽度断点,如下所示: // Media queries breakpoints// ---
自Bootstrap 3以来,不再有响应式和标准样式表的独立文件。那么如何轻松地删除响应功能?
解决方法
要禁用非桌面样式,您只需要更改variables.less文件中的4行代码。在variables.less文件中设置屏幕宽度断点,如下所示:
// Media queries breakpoints // -------------------------------------------------- // Extra small screen / phone // Note: Deprecated @screen-xs and @screen-phone as of v3.0.1 @screen-xs: 1px; @screen-xs-min: @screen-xs; @screen-phone: @screen-xs-min; // Small screen / tablet // Note: Deprecated @screen-sm and @screen-tablet as of v3.0.1 @screen-sm: 2px; @screen-sm-min: @screen-sm; @screen-tablet: @screen-sm-min; // Medium screen / desktop // Note: Deprecated @screen-md and @screen-desktop as of v3.0.1 @screen-md: 3px; @screen-md-min: @screen-md; @screen-desktop: @screen-md-min; // Large screen / wide desktop // Note: Deprecated @screen-lg and @screen-lg-desktop as of v3.0.1 @screen-lg: 9999px; @screen-lg-min: @screen-lg; @screen-lg-desktop: @screen-lg-min; 这会将桌面样式媒体查询的最小宽度设置为较低,以便适用于所有屏幕宽度。感谢2calledchaos的改进!一些基本样式是在移动样式中定义的,因此我们需要确保包含它们。 编辑:chris指出,您可以在引导站点上的在线少编译器中设置这些变量 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |