Answer the question
In order to leave comments, you need to log in
Rubber background pictures?
Good day, tell me, who knows a ready-made plugin for reponsive background images? I need the image to maintain its proportionality at different screen resolutions. I set it up manually with background-size : 100% auto and a bunch of mediaqueries. But every time you have to do it in a new way. It's a pity to waste time. And you can't find it on the Internet.
Answer the question
In order to leave comments, you need to log in
<div class="intro">
<img src="..." class="intro-bg">
<div class="intro-content">
...
</div>
</div>
.intro {
position: relative;
}
.intro-bg {
max-width: 100%;
height: auto;
}
.intro-content {
position: absolute;
top 0; left 0;
width: 100%;
height: 100%;
}
div{
background: url(../images/fon.png) no-repeat scroll center 0 / cover;
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%
z-index: 0;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question