2

div下部を下部 0 に配置し、位置を固定する CSS コードがあります。これは完全に機能しますが、ウィンドウのサイズを変更すると、下部divが上のウィンドウ (中央と上部) を隠します。コードは次のとおりです。

.topFull{
  width:100%;
  height: 90px;
  background:#1b3f61;
  position: fixed;
  top: 0px;
  left: 0px;
}
.middle{
  width:100%;
  min-width:850px;
  max-width:1000px;
  height: auto;
  margin-top: 120px;
  position: absolute;
  margin-left: -50px;
}
.bottomFull{
  width: 100%;
  background:#1b3f61;
  height: 180px;
  position: fixed;
  left: 0;
  bottom: 0;
}
4

2 に答える 2

0

あなたの.bottomFullタグは固定され、180px高さがあります。したがって、画面が小さい場合は、常に他のコンテンツの上に配置されます。

次のようなことができます。

@media only screen and (max-width:500px){
.bottomFull{height:80px;}
}
于 2013-11-13T11:59:05.933 に答える
0

私はそれを解決したと思います。bottomFull プロパティをいじる代わりに、中央の div を少し変更して追加します

padding-bottom: 120px

今でも私のbottomFull divは常にウィンドウの一番下にあり、スクロールして中央のdivの内容を表示できます。

于 2013-11-13T14:47:51.640 に答える