2017-03-20 57 views
0

我正在嘗試爲我的網站在bigcartel上構建一個簡單的登錄頁面。 我試圖讓一個全屏圖像佔據了整個頁面,被點擊 噸這一研究後後引導到產品頁面得到它是什麼,我都拿出了動態全屏圖像啓動頁面

<head> 
<a href="/products"> 
<img title="click to enter" src="http://i.imgur.com/QC0IqJ9.gif" 
style="width: 100%"; style="height: 100vh"> 

<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<style> 
< 
body { 
background: src="http://i.imgur.com/QC0IqJ9.gif" ; 
background-size: 100% 100%; 
} 
--> 
<a { 
position:absolute; 
top:0; 
left:0; 
width:100%; 
height:100%; 
}> 
</style> 
    </a> 
    {{ head_content }} 
</head> 

我的問題是,我不能得到拉伸圖像,適合根據瀏覽器分辨率

回答

0

你有你的<style>內的一些非常奇怪的標籤,但我假設他們Scrapy,飛濺的一部分。問題是你的線路background: src="http://i.imgur.com/QC0IqJ9.gif";。你設置的CSS,所以你沒有設置src,您可以設置一個url()這樣:

body { 
 
    background: url("http://i.imgur.com/QC0IqJ9.gif"); 
 
    background-size: 100% 100%; 
 
}
<body> 
 
</body>

希望這有助於! :)