简体   繁体   English

网站上线时看起来不一样

[英]website looks different when live

so i don't think my website is picking up the css as when i make it live, the content is there but the style is not. 因此,我认为我的网站没有像当我启用它时那样吸引CSS,但内容在那里,但样式却没有。 The background is black when it should be white, the font isnt taking effect & the nav isnt showing either. 背景应该为白色时为黑色,字体不起作用,导航也不显示。 I have done 2 sites the same way only difference is i have uploaded the site to a HTDOCS folder rather than a public_html as this what the hosting said to do... 我已经用相同的方式完成了2个站点,唯一的不同是,我已将该站点上传到HTDOCS文件夹而不是public_html,因为这是托管服务商所说的...

this is what it looks like live 这就是现场的样子

but should look like this 但应该看起来像这样

HEAD OF INDEX 索引头

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <!-- PAGE TITLE -->
    <title>Peacehaven Golf & Fitness</title>
    <!-- MAKE IT RESPONSIVE -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- SEO -->
    <meta name="description" content=peacehavengolfcourse">
    <meta name="author" content="">
    <!-- BOOTSTRAP -->
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
    <!-- STYLES -->
    <link href="css/style.css" rel="stylesheet" media="screen">
    <!-- FONTS -->
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Playfair+Display:400,700,400italic' rel='stylesheet' type='text/css'>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->
  </head>

If you're sure that CSS is there, it may be a cache issue. 如果您确定CSS在那里,则可能是缓存问题。 The old assets are cached by your browser and the new assets are not loaded. 您的浏览器会缓存旧资产,而不会加载新资产。

To test, load the website in incognito mode, and the browser won't cache/load the cache. 要进行测试,请以隐身模式加载网站,浏览器将不会缓存/加载缓存。

Mac: 苹果电脑:

Cmd + Shift + N 

Windows/Linux: 在Windows / Linux的:

Ctrl + Shift + N

您好,您的网站正在运行,但是您可以更改此代码行10: <meta name="description" content=peacehavengolfcourse">更改为<meta name="description" content="peacehavengolfcourse">并删除行38和40 </li> </ul>添加第309行<footer>您有语法错误...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM