Положение фонового изображения, центр-центр не работает ⇐ CSS
-
Anonymous
Положение фонового изображения, центр-центр не работает
I'm trying to create a page with a centered background image and using the position center center. But instead of appearing centered both vertically and horizontally the image appears to extend vertically beyond the top of the page. Where/why am I going wrong?
body { background-image:url('tumbleweed.jpg'); background-repeat:no-repeat; background-position:center center; background-color:#EAEAEA; }
Источник: https://stackoverflow.com/questions/267 ... ot-working
I'm trying to create a page with a centered background image and using the position center center. But instead of appearing centered both vertically and horizontally the image appears to extend vertically beyond the top of the page. Where/why am I going wrong?
body { background-image:url('tumbleweed.jpg'); background-repeat:no-repeat; background-position:center center; background-color:#EAEAEA; }
Источник: https://stackoverflow.com/questions/267 ... ot-working
Мобильная версия