gpt4 book ai didi

css - ionic 2,背景图片后的内容没有覆盖所有页面

转载 作者:行者123 更新时间:2023-11-28 04:01:00 25 4
gpt4 key购买 nike

在我的 ionic 2 应用程序中,我正在尝试在页面上放置背景图片。

View 包含幻灯片,但我希望背景固定在幻灯片后面。

它几乎可以工作,除了顶部有一条黑线似乎没有被背景覆盖。

在我的 page.scss 文件中:

page-onboarding {

.onboardingcontent, .onboardingcontent.content-md {
// background-color: black;
background-color: black !important;
color: white;
}
.onboardingcontent::after {
content:"";
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
background-image: url(../img/LouisRomainSpeed.jpg);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
opacity: 0.3;
// z-index: 1;
}

enter image description here

最佳答案

将背景图像添加到 .scroll-content,如下所示:

.scroll-content {
content:"";
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
background-image: url(../img/LouisRomainSpeed.jpg);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
opacity: 0.3;
}

您可以在scroll-contentfixed-content 中使用它

关于css - ionic 2,背景图片后的内容没有覆盖所有页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43204878/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com