【问题标题】:github pages missing pathgithub页面缺少路径
【发布时间】:2019-02-23 03:55:16
【问题描述】:

在我的 github 存储库中,路径“TriviaGame/assets/images/”中存在一个文件夹,但在该存储库的 io 页面上,该文件的路径会生成“404”。似乎github页面没有上传图片。 ["TriviaGame/assets/images/backgroundimage.png"][1]

琐事游戏/assets/images/backgroundImage.png https://dboothy.github.io/TriviaGame/assets/images/backgroundimage.png

加载资源失败:服务器响应状态为404()

dboothy.github.io/:1 GET https://dboothy.github.io/TriviaGame/assets/images/backgroundimage.png404

404 error on io

[1]:

.content-wrap {
	background: url("../images/backgroundimage.png") no-repeat center fixed;
	background-size: cover;
	min-height: 100vh;
}
<div class="content-wrap" align="center">
<div id="heading" class="hide">
		<h2>Time remaining: <span id="timer"></span></h2>
	</div>
	<div class= "container">
		<div id = "game-wrapper">
				<div id="main-content">
					<div class="content-container">
						<h1>Movie Trivia</h1>
						<div id="welcome">
							<p>try and answer as many question in the time allowed</p>
							<div id="results" class="hide"></div>
							<button id="startGame" class="textBox">Start</button>
						</div>
						<div id="gameWrap" class="hide">
							<div id="questionWrap"></div>
							<button id="finish" class="btn btn-warning">FINISH</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

https://i.stack.imgur.com/R7kG8.png

【问题讨论】:

    标签: github-pages relative-path


    【解决方案1】:

    在上面的 css 中,我输入了: "../images/backgroundimage.png"

    当实际文件被命名为“../images/backgroundImage.png”时

    【讨论】:

      猜你喜欢
      • 2013-04-25
      • 1970-01-01
      • 1970-01-01
      • 2014-11-30
      • 1970-01-01
      • 1970-01-01
      • 2018-04-25
      • 2021-07-12
      • 1970-01-01
      相关资源
      最近更新 更多