Hello!
I want to help, but I need a little more information. I saw that you provided the information about the image. But I right here with a random image of the Internet had no problems with the code and it seemed normal.
Could you provide the image? Or describe what you are trying to do? Do you want to cover the entire screen with the image?
I’m sorry to put it here in answer form, but I’m not at liberty to comment.
EDIT
If to occupy the entire screen, it needs to be in display: table
?
That would work:
.intro {
display: block;
width: 100vw;
height: 100vh;
padding: 0;
text-align: center;
color: white;
background: url(../img/Banner-Site.png) no-repeat bottom center scroll;
background-position: 30% 45%;
background-color: black;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
}
EDIT 2
If the image is large enough, you can replace the cover
for contain
. There is less possibility of distortion. The cover
forces the image to fit whole on the screen, already the contain
fits her in the best way possible.
Personally recommend a much wider image than high for desktop and a higher version than wide for mobile. And this way use the contain
not to distort.
EDIT 3
body {
margin: 0;
}
.intro {
display: block;
width: 100vw;
height: 100vh;
padding: 0;
text-align: center;
color: white;
background: url(../img/Banner-Site.png) no-repeat bottom center scroll;
background-color: black;
-webkit-background-size: contain;
-moz-background-size: contain;
background-size: contain;
-o-background-size: contain;
}
These stripes on the sides I would have to see in your image, because here I am not able to simulate, but at first I imagine it may be of the margin created by body
.
But in question the responsiveness, so I said make versions.
You would have to work with Media Queries and versions of the same image to better adapt to mobile or tablet. Maybe this part is better if you do a little research to better understand, but what they do is adapt their CSS to different types of screens, like smartphones and tablets.
Read the question: http://meta.pt.stackoverflow.com/q/5483/132 and the answer: http://meta.pt.stackoverflow.com/a/5505/132.
– Victor Stafusa
put the image information as well. size, weight and format.
– RFL
I have a monitor with a resolution of 2560 x 1080. Test by placing the images in a size of 3000 x 1000. And in smaller sizes as well. All images are in PNG, saved in Photoshop as web file.
– Wess
Ever used a max-width:100%; ?
– Gilmar Santos
Already tried, I put max-width:100%; the image disappears and everything is white.
– Wess