2017-02-10 6 views
-1

これはPHPプロジェクトです。私は私のPHPウェブサイトのための内部スタイルシートをしたい。私が設計した10から12ページのPHPページがあります。 PHP用の内部スタイルシートを作成する方法は?私はindex.phpやその他のPHPページでそれを行う必要がありますか?または、index.phpを含むすべてのPHPページで内部スタイルシートを設計できますか?ここで私のPHPページの内部CSSスタイルをデザインする

私のコードです:

<!DOCTYPE html> 
<html> 
    <head prefix="http://ogp.me/ns/website#" itemscope itemtype="http://schema.org/WebSite" > 
     <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
     <title>Custom Personalized Playing Cards Manufacturer Company- AllTypesofPlayingCards</title> 
     <meta name="description" content="AllTypesofPlayingCards Manufacturer Company in India offers various deck of playing cards - custom personalized playing cards, plastic playing cards & branded playing cards, etc at lowest rate. " /> 
     <meta name="keywords" content="deck of playing cards, custom playing cards, jumbo playing cards, novelty playing cards, promotional playing cards, plastic playing cards, branded playing cards, custom deck of cards" /> 
     <link itemprop="url" rel="canonical" href="http://www.alltypesofplayingcards.com/" /> 
     <META name="ROBOTS" content="index, follow"> 
     <link rel="alternate" type="application/rss+xml" href="rss.xml" title="RSS feed for My Page"> 
     <!--og tag--> <meta property="og:type" content="product"> 
     <meta property="og:title" content="Custom Personalized Playing Cards Manufacturer Company- AllTypesofPlayingCards"> 
     <meta itemprop="name" property="og:site_name" content="All Types of Playing Cards"> 
     <meta property="og:url" content="http://www.alltypesofplayingcards.com/"> 
     <meta property="og:description" content="AllTypesofPlayingCards Manufacturer Company in India offers various deck of playing cards - custom personalized playing cards, plastic playing cards & branded playing cards, etc at lowest rate. "> 
     <meta property="og:locale" content="en_US"/> 
     <meta property="og:keywords" content="deck of playing cards, custom playing cards, jumbo playing cards, novelty playing cards, promotional playing cards, plastic playing cards, branded playing cards, custom deck of cards"/> 
     <meta property="product:condition" content="new"> 
     <meta property="product:availability" content="in stock"> 
     <meta property="og:locale" content="en_US"/> 
     <meta property="og:image" content="images/jumbo-playing-cards.jpg"/> 
     <meta property="og:image:type" content="image/jpeg" /> 
     <meta property="og:image" content="images/pure-plastic-playing-cards.jpg"/> 
     <meta property="og:image:type" content="image/jpeg" /> 
     <meta property="og:image" content="images/promotional-playing-cards.jpg"/> 
     <meta property="og:image:type" content="image/jpeg" /> 
     <meta property="og:image" content="images/custom-playing-cards.jpg"/> 
     <meta property="og:image:type" content="image/jpeg" /> 
     <!--twitter tag--> <meta name="twitter:card" content="summary_large_image"> 
     <meta name="twitter:site" content="@ATPCSM"> 
     <meta name="twitter:title" content="Custom Personalized Playing Cards Manufacturer Company- AllTypesofPlayingCards"> 
     <meta name="twitter:description" content="AllTypesofPlayingCards Manufacturer Company in India offers various deck of playing cards - custom personalized playing cards, plastic playing cards & branded playing cards, etc at lowest rate. "> 
     <meta name="twitter:image" content="images/jumbo-playing-cards.jpg" /> 
     <!--Yandex.Metrika counter-<script type="text/javascript"> (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter40316140 = new Ya.Metrika({ id:40316140, clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true, trackHash:true, ecommerce:"dataLayer" }); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function() { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = "https://mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks"); </script> --> 
     <meta name="viewport" content="width=device-width, initial-scale=1"/>  
     <script type="application/x-javascript"> addEventListener("load", function() {setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> 
     <!--bootstrap--><link rel="stylesheet" href="css/bootstrap.min.css"> 
     <link rel="stylesheet" href="css/font-awesome.min.css"> 
     <link href="css/style1.css" rel="stylesheet" type="text/css" /> 
     <link href="css/responsive-style.css" rel="stylesheet" type="text/css" /> 
     <script type='text/javascript' src="js/jquery-2.1.4.min.js"></script> 
     <script type='text/javascript' src="js/jquery-1.11.1.min.js"></script> 
     <script type="text/javascript" src="js/bootstrap-3.1.1.min.js"></script> 
     <script> 
      $(document).ready(function(){ 
       //$('#slider1').cycle('fade'); 
       /* $('#slider').cycle({ 
        fx: 'scrollLeft', 
        speed: '500', 
        timeout: '1000' 
       }); */ 
      }); 
     </script> 
     <script> 
      var isNS = (navigator.appName == "Netscape") ? 1 : 0; 
      if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP); 
      function mischandler() 
      { 
       return false; 
      } 

      function mousehandler(e) 
      { 
       var myevent = (isNS) ? e : event;  
       var eventbutton = (isNS) ? myevent.which : myevent.button; 
       if((eventbutton==2)||(eventbutton==3)) return false; 
      } 
      document.oncontextmenu = mischandler; 
      document.onmousedown = mousehandler; 
      document.onmouseup = mousehandler; 
     </script> 



     <?php include("include files/favicon.php"); ?> 

     </head> 
     <body itemscope itemtype="http://schema.org/Product"> 
     <?php include_once("analyticstracking.php"); ?> 
     <?php include("include files/header.php");?> 
     <?php include("include files/navigation.php");?> 
      <!--Image Slider--> 
      <div id="slider"> 
       <div class="well"> 
        <div id="myCarousel" class="carousel slide" data-ride="carousel"> 
         <!--Indicators--> 
         <ol class="carousel-indicators"> 
          <li data-target="#myCarousel" data-slide-to="0" class="active"></li> 
          <li data-target="#myCarousel" data-slide-to="1"></li> 
          <li data-target="#myCarousel" data-slide-to="2"></li> 
          <li data-target="#myCarousel" data-slide-to="3"></li> 
         </ol> 
         <!--Wrapper for slides--> 
         <div class="carousel-inner" itemscope itemtype="http://schema.org/WPSideBar"> 
          <div class="item active"> <img itemprop="url" src="images/custom-playing-cards.jpg" alt="custom game cards"></div> 
          <div class="item"> <img itemprop="url" src="images/jumbo-playing-cards.jpg" alt="large print playing cards"></div> 
          <div class="item"> <img itemprop="url" src="images/pure-plastic-playing-cards.jpg" alt="buy playing cards online"></div> 
          <div class="item"> <img itemprop="url" src="images/promotional-playing-cards.jpg" alt="custom logo playing cards"></div> 
         </div> 
         <!--Left and right controls--> 
         <a class="left carousel-control" href="#myCarousel" data-slide="prev"><img src="images/prev.png" alt="go to previous" class="arrow"></a> 
         <a class="right carousel-control" href="#myCarousel" data-slide="next"><img src="images/next.png" alt="go to next" class="arrow"></a> 
        </div> 
       </div> 
      </div> 
      <!--breadcrumb--> 
      <div id='location'> 
       <div id="BannerAndNavigatorHtmlBlock_StoreNavigator_pnNavigator" itemscope="" itemtype="http://schema.org/BreadcrumbList" class="btn-group btn-breadcrumb"><span class="btn btn-success" itemscope="" itemprop='itemListElement' itemtype="http://schema.org/ListItem"><span class="glyphicon glyphicon-home" itemprop="name"></span> 
        <meta itemprop="position" content="1" /> 
        </span> 
       </div> 
      </div> 
      <!--Mid Content--> 
      <div class="middle-content"> 
       <div class="container"> 
        <div class="wrapper"> 
         <h1>Welcome</h1></div> 
        <div class="rows"> 
         <div class="col-sm-4" itemscope itemtype="http://schema.org/Product"> 
          <div class="column"> 
           <h2 class="heading1" itemprop="name">Custom Playing Cards</h2> 
           <div class="content-block"> 
            <p itemprop="description">Custom Playing Cards are custom made as per the needs and requirements of the client and it is exactly as the way the customer would want their deck of playing.</p> 
           </div> 
           <div class="readMore"><a href="custom-playing-cards.php" class="btn btnSmall"><span>Read More</span></a></div> 
          </div> 
          <div>&nbsp;</div> 
         </div> 
         <div class="col-sm-4" itemscope itemtype="http://schema.org/Product"> 
          <div class="column"> 
           <h2 class="heading1" itemprop="name">Promotional Playing Cards</h2> 
           <div class="content-block"> 
            <p itemprop="description">Promotional Playing Cards are used as an ideal advertising and marketing tool, as they catch the eye to gain more and more new clientele and alongside promote and endorse.</p> 
           </div> 
           <div class="readMore"><a href="promotional-playing-cards.php" class="btn btnSmall"><span>Read More</span></a></div> 
          </div> 
          <div>&nbsp;</div> 
         </div> 
         <div class="col-sm-4" itemscope itemtype="http://schema.org/Product"> 
          <div class="column"> 
           <h2 class="heading1" itemprop="name">Plastic Playing Cards</h2> 
           <div class="content-block"> 
            <p itemprop="description">100% Pure Plastic Playing Cards are rugged, washable and 100% Durable and are great for use by kids, The extreme quality of these cards allow them to be used.</p> 
           </div> 
           <div class="readMore"><a href="plastic-playing-cards.php" class="btn btnSmall"><span>Read More</span></a></div> 
          </div> 
         </div> 
        </div> 
        <div class="rows" id="col-block"> 
         <div class="col-sm-6" itemscope itemtype="http://schema.org/Product"> 
          <div class="column"> 
           <h2 class="heading1" itemprop="name">Jumbo Playing Cards</h2> 
           <div class="content-block"> 
            <p itemprop="description">Jumbo cards or Giant cards are a real favorite with magicians and performers. These large cards can be used as flash cards or cards to educate.</p> 
           </div> 
           <div class="readMore"><a href="jumbo-playing-cards.php" class="btn btnSmall"><span>Read More</span></a></div> 
          </div> 
          <div>&nbsp;</div> 
         </div> 
         <div class="col-sm-6" itemscope itemtype="http://schema.org/Product"> 
          <div class="column"> 
           <h2 class="heading1" itemprop="name">Novelty Playing Cards</h2> 
           <div class="content-block"> 
            <p itemprop="description">Novelty By itself means &quot;new&quot; and that exactly what these cards are about. they have new designs, shapes, motifs on them and they are unlike</p> 
           </div> 
           <div class="readMore"><a href="novelty-playing-cards.php" class="btn btnSmall"><span>Read More</span></a></div> 
          </div> 
          <div>&nbsp;</div> 
         </div> 
        </div> 
       </div> 
      </div> 
      <?php include("include files/footer.php");?> 
     </body> 
</html> 
+0

「内部スタイルシート」とはどういう意味ですか?スタイルシートへのリンクを、使用したいすべてのページの先頭に単純に含めることができます。 – Archer

+1

[ask]を読んで、コードの最小化と[mcve]の使用について考えてください。 – evolutionxbox

答えて

0

あなたは、外部スタイルシート使用できるインラインスタイルタグ

<style></style> 

を使用することができます。

<link rel="stylesheet" type="text/css" href="stylesheetname.css"> 

参考:

http://www.w3schools.com/css/css_howto.asp

外部スタイルシートは、コードの再利用を減らし、よりクリーンなコードを作成するため、複数のページに役立ちます。あなたのページに外部スタイルシートを使用することをお勧めします。

関連する問題