Css:在隐藏前一个 div 时响应其他 div

Css: responsive other divs when hide a previous div

我的页面在这里:https://webtan.jp/

我隐藏这部分:

#top__fullcarousel {
    display: none;

}

但在隐藏它之后,下面的部分(siteContent 块)不适合( the error here)

我修复了内边距,它只适用于视口(最小宽度 1200 像素),不能正确地用于其他视口(移动设备,ipad...)

.siteContent {
    padding-top: 129px;

}

在这种情况下我该如何回应?

您可以明确设置每个设备宽度所需的填充:

@media screen and (max-width: 1000px) {
  .siteContent {
    padding-top: 129px;
  }
}

@media screen and (max-width: 850px) {
  .siteContent {
    padding-top: 109px;
  }
}

@media screen and (max-width: 600px) {
  .siteContent {
    padding-top: 89px;
  }
}

@media screen and (max-width: 320px) {
  .siteContent {
    padding-top: 69px;
  }
}

当然你可以使用很多其他的方法,但这个是最简单的方法。