如何解决CSS在本地的Safari浏览器中有效,但是在我将代码上传到cPanel
我已将所有文件上传到我的Web服务器(我使用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键执行硬刷新,这将强制加载新的CSS。
,检查CSS文件的路径。您的CSS文件路径可能不正确。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。