2017-03-20 52 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>

希望这有助于! :)