【发布时间】:2019-03-18 03:40:56
【问题描述】:
下午好 试图在我的着陆时制作响应式背景,但由于某种原因我不能 我试图使用 height: auto, height: 100% 和 margin: 0 auto;高度 100% 有效,但它没有覆盖到我的屏幕下方,我拥有它超过了我的需要。 这是我的代码:
.crossfade > figure {
animation: imageAnimation 48s linear infinite 0s;
backface-visibility: hidden;
background-size: cover;
background-position: center center;
height: 470px;
left: 0px;
opacity: 0;
position: absolute;
top: 189px;
width: 100%;
background-color: rgba(0,0,0,.3);
background-blend-mode: darken;
z-index: 0;
}
只有一件事对我有用,那就是:
height: calc(100vh - 189px);
189px 它从我的标题菜单中缩进,但是我有什么方法可以让它在没有 calc 的情况下工作? 希望你明白我的意思 谢谢
【问题讨论】:
-
添加您的 html 代码。
-
这里是网页daotech.org
标签: html css background frontend responsive