如何在MaterialiseCSS中更改容器的默认宽度?

前端之家收集整理的这篇文章主要介绍了如何在MaterialiseCSS中更改容器的默认宽度?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

MaterialiseCSS中容器的默认宽度为set to 70%

The container class is not strictly part of the grid but is important
in laying out content. It allows you to center your page content. The
container class is set to ~70% of the window width. It helps you
center and contain your page content. We use the container to contain
our body content.

怎么会改变?

最佳答案
只需通过确保在链接或导入materialize.css后浏览器读取您的样式来覆盖该属性

您需要复制并更改这些值:

.container {
  margin: 0 auto;
  max-width: 1280px;
  width: 90%;
}
@media only screen and (min-width: 601px) {
  .container {
    width: 85%;
  }
}
@media only screen and (min-width: 993px) {
  .container {
    width: 70%;
  }
}
原文链接:https://www.f2er.com/css/427507.html

猜你在找的CSS相关文章