1

我正在为我的网站上的一些无样式内容而苦苦挣扎。首次访问它时,您会在实际加载到屏幕之前看到未设置样式的内容:

您可以在这里亲自查看:http: //galaxynode.com

我不精通html,所以我需要一些详细的帮助:

这是我的代码:

<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 的情况下可以理解的内容。

4

1 回答 1

1

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

您实际上是在加载正文时加载样式表。您看到 flash 是因为尚未应用 css 属性。当额外的<body>标签被删除时,样式表将成为的一部分,<head>并将首先加载。

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

body
{
   background-image: url('http://galaxynode.com/images/background.jpg');
}
于 2013-09-05T03:51:32.713 回答