2009-02-25 96 views
1

Flex應用程序設置爲900像素寬度。
對象標籤設置爲900像素寬度。FireFox Flex佈局/渲染問題

Firefox正在以請求大小的110%渲染對象。所以在對象的正確尺寸上有一個空白的垂直列。 (這樣做,如果我也設置固定的高度)

如果我將對象標記的寬度設置爲810,那麼它們匹配起來,但這對我來說太過分了。

這是對象標籤。

  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="FlashID" title="userlist"> 
      <param name="movie" value="swf/userlist.swf" /> 
      <param name="quality" value="high" /> 
      <param name="wmode" value="opaque" /> 
      <param name="swfversion" value="9.0.45.0" /> 
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --> 
      <param name="expressinstall" value="Scripts/expressInstall.swf" /> 
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> 
      <!--[if !IE]>--> 
      <object type="application/x-shockwave-flash" data="swf/userlist.swf" width="100%" height="100%" > 
       <!--<![endif]--> 
       <param name="quality" value="high" /> 
       <param name="wmode" value="opaque" /> 
       <param name="swfversion" value="9.0.45.0" /> 
       <param name="expressinstall" value="Scripts/expressInstall.swf" /> 
       <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --> 
       <div> 
       <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> 
       <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> 
       </div> 
       <!--[if !IE]>--> 
      </object> 
      <!--<![endif]--> 
      </object> 

回答

2

我想這是因爲外<object>標籤,它不會做任何事情在FF有用的反正。您可以通過省略測試來輕鬆驗證該理論。如果我是正確的,我建議你使用SWFObject來渲染嵌入代碼。或者,您可以添加一些CSS技巧來在FF中隱藏該邊框。

+0

我第二個SWFObject。我認爲通常你不應該手動編寫用於嵌入Flash的對象標籤。 SWFObject使得它更容易,它處理瀏覽器的差異。 – Herms 2009-02-27 16:07:10

0

代碼中的註釋說明爲什麼需要外部對象標記。它適用於Internet Explorer。

+0

當然,但它在FF中是超炫的,並且導致佈局問題。使用SWFObject可以解決所有瀏覽器的問題。 – 2009-02-27 17:15:23