2014-05-11 27 views
0

我正在嘗試顯示Bing主頁here
這是一個網絡抓取工具,它可以找到圖像網址並將其設置爲背景圖片 。
但像往常一樣,Internet Explorer始終存在問題。 但我希望IE11能夠很好地處理它。然而,它沒有。 我的目標是放大和縮小, 背景圖像不應該調整大小。
在Chrome瀏覽器和Mozilla Firefox瀏覽器中一切正常。
我想嘗試使其在所有瀏覽器上看起來都一樣。我應該做什麼?跨瀏覽器合規性 - Bing壁紙網頁掃描

這裏是我的代碼:

echo '<!DOCTYPE html>'; 
echo '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>'; 
echo '<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />'; 
echo "<title>Bing Wallpaper Scraper</title>"; 
$style="body { 
background-image: url('$v'); 
-moz-background-size: cover; 
-o-background-size: cover; 
-webkit-background-size: cover; 
background-size: cover; 
background-position: top center !important; 
background-repeat: no-repeat !important; 
background-attachment: fixed; 
}"; 
echo "<style>$style</style>"; 
echo "</head>"; 
echo "<body>";//background='$v' 
echo "<div style='text-align:center;'>"; 
echo "<h1 style='color:white'> I did it! </h1>"; 
echo "<h2 style='color:white'> You too can! </h2>"; 
echo "</div>"; 
echo "</body></html>"; 

變量$ V已經從網站刮板的圖像URL。 正如它在this xml文件或this json輸出中可用。

回答

0

刪除背景附件屬性,你會得到你正在尋找。

+0

謝謝。修正:) – computingfreak