html - 我的网页内容一直与我的背景图片幻灯片重叠,我已经尽我所能来解决这个问题
问题描述
您可以在https://enigterry.github.io/nwtest.html预览该站点。这是我的代码的链接https://github.com/enigterry/enigterry.github.io/blob/main/nwtest.html
解决方案
问题在于z-index
. 您需要添加高于 0 的 z-index(这是为 hero 设置的),但为了安全起见,请说 99。此外,要使 z-index 正常工作,您需要position
将relative
. 另一个问题是添加到容器中的黑色背景遍布整个页面。删除它并应用于.w3-content
. 您仍然需要处理填充以使其看起来更好。
.w3-content {
max-width: 980px;
background-color: #000;
position: relative;
z-index: 99;
}
推荐阅读
- nestjs - 在nestjs中验证DTO
- assembly - MIPS 汇编语言中的 jal 指令不保存返回地址
- laravel - Laravel groupBy 选择多个字段
- reactjs - ESLint 的 extends 属性是否被附加到 overrides 设置中的 extends 属性
- node.js - 错误:包括意外。元素必须是模型,关联......与 sequelize.literal
- php - 禁用操作所需的身份验证
- java - 如何使用地理编码器在 Onsensor 更改方法中使用用户当前坐标
- python - 在python中一次计算和生成多个标准差列但不是以固定的累积顺序
- homebrew - 返回dbt 19.1版本
- python - pdf抓取后拆分列