bootstrap

container和container-fluid的区别

原始链接

container
根据显示设备满足的最小宽度,来决定实际内容宽度,是一个根据设置内容阶梯式响应的布局。
例子:
@media (min-width: 568px) {
  .container {
    width: 550px;
  }
}
@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}
@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}

 

假如当前显示设备尺寸是1000,满足最小宽度992,所以内容的宽度是970。假如设备宽度慢慢增长,在1000到1200之间时,内容宽度不变;设备宽度到达1200时,内容宽度变为1170。
 
container-fluid
当设备宽度慢慢增长时,内容宽度会随之慢慢增长,保持填充至整个屏幕宽度。

JavaScript

Promise 中reject 和 catch 的处理上有什么区别?

reject捕获promise在运行过程中(产生决断前)的错误,catch可以捕获决断后(比如resolved函数中)的错误。
 
Promise.Resolve()
Promise.resolve(42)可以认为是以下代码的语法糖。
new Promise(function(resolve){
    resolve(42);
});

它返回一个新的Promise对象,将参数传递给resolve方法并调用resolve()。  

 

 

相关文章:

  • 2021-05-19
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2021-05-21
  • 2022-01-07
  • 2021-09-28
猜你喜欢
  • 2022-12-23
  • 2021-10-19
  • 2022-02-26
  • 2021-11-16
  • 2021-12-01
  • 2021-05-16
相关资源
相似解决方案