首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >我无法在我的网站上删除FOUC

我无法在我的网站上删除FOUC
EN

Stack Overflow用户
提问于 2013-09-05 11:42:12
回答 1查看 182关注 0票数 1

我正在与我的网站上闪现的无样式内容作斗争。第一次访问它时,在实际加载到屏幕上之前,您会看到未设置样式的内容:

你可以在这里亲眼看到:http://galaxynode.com

我的html不太流利,所以我需要一些详细的帮助:

下面是我的代码:

代码语言:javascript
运行
复制
<html lang="en">
<head>
    <title> Galaxy Node Server Hosting | Premium Minecraft Hosting For $2.99! </title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css;">
    <meta name="Author" content="Steve">
    <meta name="Keywords" content="minecraft server hosting, dedicated server     hosting, cheap minecraft server hosting, best minecraft server hosts, minecraft dedicated server hosting, online server hosting, free minecraft server hosting, minecraft server hosts, best minecraft server hosting, dedicated servers hosting, galaxy node">
    <meta name="Description" content="Galaxy Node Server Hosting aims to provide the highest quality Minecraft servers at an extremely low price.
    We have the best customer service of all Minecraft server hosting providers! You will not be disappointed!">
    <body background="http://galaxynode.com/images/background.jpg">
    <link rel="stylesheet" href="galaxynodewebsite_g.css" type="text/css" media="screen,projection,print">  <!--// Document Style //-->
    <link rel="stylesheet" href="index_p.css" type="text/css" media="screen,projection,print">  <!--// Page Style //-->
</head>

<body>
// body content
</body>
</html>

有人能告诉我,我可以在这里放什么,以阻止显示的东西,直到它完全加载?任何修复都是很棒的!我不知道html,所以请告诉我我可以在这里输入的确切内容,或者在不太了解html或javascript的情况下可以理解的内容。

EN

回答 1

Stack Overflow用户

发布于 2013-09-05 11:51:33

删除您已经创建了另一个<body>标记的<body background="http://galaxynode.com/images/background.jpg">

当主体被加载时,您实际上是在加载样式表。您看到flash是因为还没有应用css属性。删除额外的<body>标记后,样式表将成为<head>的一部分,并首先加载。

如果您想保留背景,请在CSS中为body添加一个属性。例如:

代码语言:javascript
运行
复制
body
{
   background-image: url('http://galaxynode.com/images/background.jpg');
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18627368

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档