stretch image to 100% of viewport

微信扫一扫,分享到朋友圈

stretch image to 100% of viewport

I made an simple layout for an android application using html and css. The hole page has an background image, but i didnt declared it as:

background-image: url(

Because so belong my information i cannot center it?
So that my next plan was to make an simple div that covers the image as you can see here:



Playing Audio

My css is the following:

.image{
position: relative; 
 width: 100%; 
 }
.oben { 
position: absolute; 
top: 20%; 
left: 0; 
width: 100%; 
}

SO now back to my actual problem, the image is not streching to the 100% of the viewport instead it is having 100% of its own width, what means around 200px! But i want to strech it all over the page! Thanks!

Problem courtesy of: Em Sta

微信扫一扫,分享到朋友圈

stretch image to 100% of viewport

CppCon 2018: Thoughts on a more powerful and simpler C++ (5 of N)—Herb Sutter

上一篇

达芬奇(Davinci)基于区块链结合人工智能发行的主链

下一篇

你也可能喜欢

stretch image to 100% of viewport

长按储存图像,分享给朋友