2014-10-16 83 views
0

我對如何使內容在全屏幕的問題,也有我的內容的代碼:全屏代碼

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">    
 
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 
 
<head> 
 
    <title>main</title> 
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
 
    <style type="text/css" media="screen"> 
 
    html, body { height:100%; background-color: #000000;} 
 
    body { margin:0; padding:0; overflow:hidden; } 
 
    #flashContent { width:100%; height:100%; } 
 
    </style> 
 
</head> 
 
<body> 
 
    <div id="flashContent"> 
 

 
     <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="800" height="600" id="main" align="middle"> 
 
      <param name="movie" value="main.swf" /> 
 
      <param name="quality" value="high" /> 
 
      <param name="bgcolor" value="#000000" /> 
 
      <param name="play" value="true" /> 
 
      <param name="loop" value="true" /> 
 
      <param name="wmode" value="window" /> 
 
      <param name="scale" value="showall" /> 
 
      <param name="menu" value="true" /> 
 
      <param name="devicefont" value="false" /> 
 
      <param name="salign" value="" /> 
 
      <param name="allowScriptAccess" value="sameDomain" /> 
 
      <!--[if !IE]>--> 
 
      <object type="application/x-shockwave-flash" data="main.swf" width="800" height="600"> 
 
       <param name="movie" value="main.swf" /> 
 
       <param name="quality" value="high" /> 
 
       <param name="bgcolor" value="#000000" /> 
 
       <param name="play" value="true" /> 
 
       <param name="loop" value="true" /> 
 
       <param name="wmode" value="window" /> 
 
       <param name="scale" value="showall" /> 
 
       <param name="menu" value="true" /> 
 
       <param name="devicefont" value="false" /> 
 
       <param name="salign" value="" /> 
 
       <param name="allowScriptAccess" value="sameDomain" /> 
 
      <!--<![endif]--> 
 
       <a href="http://www.adobe.com/go/getflash"> 
 
        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> 
 
       </a> 
 
      <!--[if !IE]>--> 
 
      </object> 
 
      <!--<![endif]--> 
 
     </object> 
 
    </div> 
 
</body>

在網頁上的當前內容位於左邊角落,它不是一個完整的大小,我知道如何使它居中,但我不知道如何使它作爲全屏顯示,請告知,謝謝。

+0

'全screen'或'全width'(如'寬度:100%')? – Justinas 2014-10-16 14:34:33

+0

嘿Justinas,我的意思是我想要在瀏覽器中填充內容爲全尺寸,它應該看起來像一般的網頁,但我目前的只是四分之一大小的東西 – user2711992 2014-10-16 14:37:23

+0

您的對象標籤已設置寬度和高度屬性...這些是去覆蓋你的CSS – chazsolo 2014-10-16 14:39:33

回答

0

您正在指定寬度和高度作爲對象本身。刪除widthheight屬性,或將其更改爲百分比。

<object style="width: 100%; height: 100%;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="main"> 
+0

嗨Justinas,感謝您的幫助,但它並沒有改變 – user2711992 2014-10-16 14:52:24

+0

@ user2711992你是否也改變了內部''?因爲我在代碼中看到兩個''標籤,它們都是'width =「800」height =「600」' – Justinas 2014-10-16 15:07:51

0

代替

#flashContent { width:100%; height:100%; } 

嘗試這種情況:

#flashContent object{ 
    position: fixed; 
    top: 0; 
    right: 0; 
    bottom: 0; 
    left: 0; 
}