0

本文のデータベースから引き出されたいくつかのコンテンツを含むページがあり、頭の上には、そのコンテンツをフォーマットするためにリンクされた外部スタイルシートがあります。Safari では (Chrome や Firefox では発生しないようです)、スタイルのないコンテンツの素敵なフラッシュが表示されます。

これにはJavaScript以外の修正が必要です。phpスクリプトが本体で実行される前に適用されるように、外部CSSシートリンクを配置する方法はありますか? -頭の一番上にいると自動的にこれが行われると思いますが、どうやらサファリではないようです。何かアイデアはありますか?

<?php
require_once "../config/article_functions.php";
include "../widgets/topborder.html";
include "../widgets/banner.php";
include "../widgets/navbar.html";
?>

<!DOCTYPE html>
<html>
<head>

<link rel="stylesheet" type="text/css" href="http://example.org/widgets/article.css">

<style type="text/css">
a:link {color: inherit;}      /* unvisited link */
a:visited {color: inherit;}  /* visited link */
a:hover {color: inherit;}  /* mouse over link */
a:active {color: inherit;}  /* selected link */

body, html {
    margin: 0;
    padding: 0;
    height:900px;
}

#container {
    width:990px;
    height:1000px;
    margin-left:auto;
    margin-right:auto;
}

#news_container {
    width:740px;
}

</style>
<title> TODO </title>

</head>
<body>
<div id="container">
    <?php include "../widgets/sidepanel.html"; ?>
    <div id = "news_container">
        <?php
            $uri = explode('/', $_GET['$url']);
            get_selected_news($uri[0]);
        ?>
    </div>
</div>
</body>
</html>

1 秒ほどの間、次のように表示されます。

ここに画像の説明を入力

その後: ここに画像の説明を入力

4

1 に答える 1