CSS 在本地的 Safari 中工作,但在我将代码上传到 cPanel 后在 Safari 中不工作
CSS works in Safari in local, but does not work in Safari after I upload the code to cPanel
我已将所有文件上传到我的网络服务器(我使用 NameCheap、cPanel)。
这是我的网页:www.gloriachen.me
在着陆页中,我的 html 和 css 是:
<!-- Landing Page -->
<div class="container-fluid">
<img src="assets/landing-page.JPG" class="img-fluid" alt="Responsive image" style="width:100%;">
<div class="top-left">
<p> <span>Hi, </span>I am Gloria Chen. I am currently a recent graduate from Australian National University (ANU)
with a master’s degree in computer science. As an enthusiastic fan of front-end development
at the moment, I am keen to look for a job on Web/App front-end development.
</p>
<p> This is my personal blog website. Initially I developed this site for practicing my
front-end skills, especially in programming. I used HTML, CSS, BootStrap 4, JavaScript
as the main languages for building my site, and would like to use Vue.js or Angular.js
for front-end framework building.
</p>
<p> It’s not easy for me to look for jobs right now at the moment, one reason is because
I just finished a surgery of a chest wall tumour removal on this September. For almost
about one and a half month, I was in the process of recovering from the treatment and
procedure. Luckily, my pathology report of the removed tumour is positive, which means
I can still be alive :). I thank God for his preserving. But now I really need to gradually
restore my mind, emotion, will and motivation, and really devote myself into working again.
</p>
<p> Things are not always easy, but I believe I will get a suitable one soon :) </p>
</div>
</div>
/* Text CSS */
.container {
position: relative;
text-align: center;
color: white;
}
.top-left{
width: 50%;
position: absolute;
top: 150px;
left: 70px;
line-height: 2;
}
文本应该位于图像的顶部。我在本地试了一下,成功了,像这样:
在我将所有文件上传到 NameCheap cPanel 之后。但是,它在 Safari 中不起作用。如果我使用 Safari 打开网站,文本将不会出现在图像的顶部。着陆页将是这样的:
谁知道这是什么原因,我该如何解决这个问题?
提前致谢!
点击您的点击对我来说看起来是正确的。
尝试清除浏览器缓存,或按住 Shift 键并单击刷新按钮执行 hard-refresh,这应该会强制加载新的 css。
检查 CSS 文件的路径。您的 CSS 文件路径可能不正确。
我已将所有文件上传到我的网络服务器(我使用 NameCheap、cPanel)。 这是我的网页:www.gloriachen.me
在着陆页中,我的 html 和 css 是:
<!-- Landing Page -->
<div class="container-fluid">
<img src="assets/landing-page.JPG" class="img-fluid" alt="Responsive image" style="width:100%;">
<div class="top-left">
<p> <span>Hi, </span>I am Gloria Chen. I am currently a recent graduate from Australian National University (ANU)
with a master’s degree in computer science. As an enthusiastic fan of front-end development
at the moment, I am keen to look for a job on Web/App front-end development.
</p>
<p> This is my personal blog website. Initially I developed this site for practicing my
front-end skills, especially in programming. I used HTML, CSS, BootStrap 4, JavaScript
as the main languages for building my site, and would like to use Vue.js or Angular.js
for front-end framework building.
</p>
<p> It’s not easy for me to look for jobs right now at the moment, one reason is because
I just finished a surgery of a chest wall tumour removal on this September. For almost
about one and a half month, I was in the process of recovering from the treatment and
procedure. Luckily, my pathology report of the removed tumour is positive, which means
I can still be alive :). I thank God for his preserving. But now I really need to gradually
restore my mind, emotion, will and motivation, and really devote myself into working again.
</p>
<p> Things are not always easy, but I believe I will get a suitable one soon :) </p>
</div>
</div>
/* Text CSS */
.container {
position: relative;
text-align: center;
color: white;
}
.top-left{
width: 50%;
position: absolute;
top: 150px;
left: 70px;
line-height: 2;
}
文本应该位于图像的顶部。我在本地试了一下,成功了,像这样:
谁知道这是什么原因,我该如何解决这个问题?
提前致谢!
点击您的点击对我来说看起来是正确的。
尝试清除浏览器缓存,或按住 Shift 键并单击刷新按钮执行 hard-refresh,这应该会强制加载新的 css。
检查 CSS 文件的路径。您的 CSS 文件路径可能不正确。