2

提供された CSS テンプレート サイトから変更した HTML/CSS Web サイトを作成しました。

Chrome、Opera、Safari で確認しましたが、問題なく動作します。

問題は、Firefox に関しては、ロゴと非常に基本的なナビゲーション要素しか表示されないことです。

Web プログラミングの経験が豊富な人が見て、何が問題なのか教えてくれることを期待していました。

私はそのような一般的な質問をするのは嫌いですが、何が起こっているのか本当にわかりません. ここでウェブサイトを見つけることができます: matroscoe.ca .

あなたの助けや指針を前もってありがとう!

<?php require('./blog/wp-blog-header.php'); ?>
<!DOCTYPE html>

<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js" lang="en" id="index"> <![endif]-->

<head>
    <!-- Analytics -->
    <?php include_once( "php/analytics.php" ); ?>

    <base href="http://matroscoe.ca" /> 
    <title>Home \\ Mat Roscoe</title>

    <!-- SEO Information -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <meta name="description" content="This website provides current information on the research and work of Matthew Roscoe">
    <meta name="author" content="Matthew Roscoe, Graduate Student, http://matroscoe.ca">

    <!-- Favicon -->
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
    <link rel="shortcut icon" type="image/png" href="favicon.png">

    <!-- CSS Style Sheets -->
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/style.css">

    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>

<body>
<!-- Prompt IE 7 users to install Chrome Frame -->
<!--[if lt IE 8]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->

<div class="container">
    <script src="js/header.js" onload="header();"></script>

    <div class="home-page main">
       <section class="grid-wrap" >
          <header class="grid col-full">
            <hr>
            <p class="fleft">Home</p>
            <a href="about.php" class="arrow fright">more info</a>
        </header>

        <div class="grid col-one-half mq2-col-full">
            <h1>
                Robotics <br>
                A.I. <br>
                Computer Vision <br>
                Space Exploration
            </h1>

            <p align="justify">
                 I am a graduate student studying <a href="http://en.wikipedia.org/wiki/3D_computer_vision">3D Vision Systems</a>
                 and <a href="http://en.wikipedia.org/wiki/Artificial_intelligence">Artificial Intelligence</a> in robotic platforms. 
                 My goal is to work in space exploration robotics in the near future. 
            </p>
            <p align="justify">
                My current interests are focused around 3D object representation that has been afforded to us thanks to new RGB-D sensors. I am also investigating ways to learn about objects on the fly. 
                You can learn more about the project I am working on either through my <a href="#">Publications Page</a> or through my <a href="#"> Projects Page </a>. 
            </p>
        </div>


        <div class="slider grid col-one-half mq2-col-full">
            <div class="flexslider">
                <div class="slides">
                  <?php
                    global $post;
                    $args = array( 'posts_per_page' => 5 );
                    $myposts = get_posts( $args );
                    foreach( $myposts as $post ) :  setup_postdata($post); ?>
                    <div class="slide">
                        <figure>
                            <?php $args = array(
                               'post_type' => 'attachment',
                               'numberposts' => -1,
                               'post_status' => null,
                               'post_parent' => $post->ID
                              );

                              $attachments = get_posts( $args );
                                 if ( $attachments ) 
                                 {
                                       //echo wp_get_attachment_image( $attachment->ID, 'full' );
                                       $image_attributes = wp_get_attachment_image_src( $attachments[1]->ID, 'full' ); ?>
                                       <img class="front" src="<?php echo $image_attributes[0]; ?>" width="400px" height="370px">
                                 <?php } ?>
                            <figcaption> 
                            <div>
                                <h5><?php the_title(); ?></h5>
                                <?php the_excerpt(); ?>
                                <p class="readmore"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Continue Reading &raquo;</a></p>              </div>
                             </figcaption>
                        </figure>
                    </div>
                    <?php endforeach; ?>
                </div>
            </div>
        </div>
    </section>
</div> <!--main-->
    <?php include("php/footer.php"); ?>
</div>

<!-- Javascript - jQuery -->
<script src="http://code.jquery.com/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script>

<!--[if (gte IE 6)&(lte IE 8)]>
<script src="js/selectivizr.js"></script>
<![endif]-->

<script src="js/jquery.flexslider-min.js"></script>
<script src="js/scripts.js"></script>

<script type="text/javascript">
var clicky_site_ids = clicky_site_ids || [];
clicky_site_ids.push(100591972);
(function() {
  var s = document.createElement('script');
  s.type = 'text/javascript';
  s.async = true;
  s.src = '//static.getclicky.com/js';
  ( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
})();
</script>
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/100591972ns.gif" /></p></noscript>
</body>
</html>
4

2 に答える 2

2

<html>タグを出力するための条件付きコメントに問題があると思います。まず、それらは Internet Explorer のみを対象としているようで、<html>通常のブラウザでタグが出力されるケースは見当たりません。第二に、最後の条件付きコメントは間違っているようです:

<!--[if gt IE 8]><!--> <html class="no-js" lang="en" id="index"> <!--<![endif]-->

おそらくあるはずです

<!--[if gt IE 8]> <html class="no-js" lang="en" id="index"> <![endif]-->

とはいえ、たとえばChromeでなぜ機能しているのかわかりません。壊れた条件付きコメントに対する Chrome の反応が異なり、<html>内部にタグを適用しているのに対し、Firefox はそうではないことが原因である可能性が高いと思います。

また、単純に次のような条件付きコメントを最後に追加してみてください。

<!--[if !IE]><html><![endif]--> 

IE 以外のブラウザをターゲットにして、それが役立つかどうかを確認します。

于 2013-03-19T15:40:25.450 に答える
0

私のサイトに問題が見つかりました。問題は、ナビゲーション メニューを作成するために Javascript を使用していたことで、これが onload() の誤った呼び出しに結び付けられていましたが、実際には発生しませんでした。Javascript からより簡潔な PHP バージョンに変更すると、問題はなくなり、Firefox を使用してサイトを表示する際に問題は発生しなくなりました。

回答は十分に異なっていたので、他の回答とは別に投稿したいと思いますが、私のコードを見て提案をする人がいなければ、エラーをキャッチすることさえできなかったでしょう。別のブラウザで私を立ち上げて実行するのを手伝ってくれてありがとう!

マット

于 2013-03-20T21:02:58.477 に答える