CSS安排两个全宽div相互吼叫

时间:2017-04-08 08:05:22

标签: css

我有两个div,其css如下:

test_task = PythonOperator(
    task_id = 'test_task',
    python_callable = AClass().a_method,
    # to pass self as first argument while calling a_method
    op_args = [AClass()],
)

我基本上想把它设计成一个典型的登陆页面,div-one是占据整个屏幕的全尺寸图像,当用户向下滚动时,他可以看到另一个全屏div-5,这或多或少是我可以展示的地方一些产品细节。现在,使用这个css:在部分渲染之前,有一个水平滚动条。

更新

.div-one:before {
  content: "";
  background: url("../../../assets/images/manhattan-min.png") center no-repeat;
  position: fixed;
  width: 100%;
  min-height: 100vh;
}

.div-one {
  width: 100%;
  height: 100vh;
}

.div-five{
  position: relative;
  background-color: brown;
  width: 100%;
  height: 100vh;
}

div-two,div-three,div-four基本打开,宽度为50%,其中div为。

1 个答案:

答案 0 :(得分:1)

您可以使用display属性:

.div-one:before {
  content: "";
  background: url("../../../assets/images/manhattan-min.png") center no-repeat;
  position: fixed;
  width: 100%;
  min-height: 100vh;
  display: block;
}

.div-one {
  width: 100%;
  height: 100vh;
  display: block;
}

.div-five{
  position: relative;
  background-color: brown;
  width: 100%;
  height: 100vh;
  display: block;
}

这应该将所有div元素放在网页上彼此之下

相关问题