gpt4 book ai didi

css - 所有 Bootstrap 断点都已弃用?

转载 作者:数据小太阳 更新时间:2023-10-29 09:11:15 24 4
gpt4 key购买 nike

查看 variables.less(以及通过谷歌搜索),似乎所有 bootstrap 的断点 less 变量都已弃用。这样对吗?如果我们想根据 Bootstrap 的屏幕尺寸断点分配样式,有人知道我们应该使用什么吗?将 Bootstrap v3.1.1 与 LESS 结合使用。谢谢。

//== Media queries breakpoints
//
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.

// Extra small screen / phone
//** Deprecated `@screen-xs` as of v3.0.1
@screen-xs: 480px;
//** Deprecated `@screen-xs-min` as of v3.2.0
@screen-xs-min: @screen-xs;
//** Deprecated `@screen-phone` as of v3.0.1
@screen-phone: @screen-xs-min;

// Small screen / tablet
//** Deprecated `@screen-sm` as of v3.0.1
@screen-sm: 768px;
@screen-sm-min: @screen-sm;
//** Deprecated `@screen-tablet` as of v3.0.1
@screen-tablet: @screen-sm-min;

// Medium screen / desktop
//** Deprecated `@screen-md` as of v3.0.1
@screen-md: 992px;
@screen-md-min: @screen-md;
//** Deprecated `@screen-desktop` as of v3.0.1
@screen-desktop: @screen-md-min;

// Large screen / wide desktop
//** Deprecated `@screen-lg` as of v3.0.1
@screen-lg: 1200px;
@screen-lg-min: @screen-lg;
//** Deprecated `@screen-lg-desktop` as of v3.0.1
@screen-lg-desktop: @screen-lg-min;

最佳答案

@seven-phases-max 所说的。 @screen-{sm,md,lg}-min 变量是您应该使用的变量。其他人已被弃用,取而代之的是这些。

并且 @screen-xs-min 已被弃用,因为 XS 没有最窄的屏幕尺寸(除非你想计算 1px),因为它是最小的断点。 (同样,LG 也没有最大宽度。)

关于css - 所有 Bootstrap 断点都已弃用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27240527/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com