html - 英雄形象不显示
问题描述
大约一个月没有使用我制作的网站后,我重新加载了该网站,我的英雄形象消失了。F12 说 div 只有 0 px 高..
`.hero-image {
background-image: url("../newhero(1).png");
/* height: 1000px;*/
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
.hero-text {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #f2f2f2;
}`
和
<div class="hero-image">
<div class="hero-text">
<h1>Judy</h1>
<p>Interior Design</p>
</div>
</div>
解决方案
推荐阅读
- unity3d - 为 Hololens 点亮场景的正确方法是什么?
- python - 从目录中读取所有 excel 文件,而不是单独列出它们
- encoding - Lambda 上的 FFmpeg 转码导致无法使用(静态)音频
- c - 为什么 `optarg` 不会被覆盖?
- c# - 如何在 .NET Core 中正确设置 WEB API 的策略授权
- javascript - 按 id 合并 2 个对象
- sql - 选择一列,拆分为多列
- python - python环境中不规则网格上的曲面图
- sql-server - 是否可以扫描数据库中的选定表并找出这些表中缺少的列?
- java - 红帽服务器上的 rt.jar Java 扫描