Html 背景图像大小未调整到700px以下
我被交给了一个现有的网站,该网站的背景图像有响应问题。背景图像分配到的Html 背景图像大小未调整到700px以下,html,css,background-image,Html,Css,Background Image,我被交给了一个现有的网站,该网站的背景图像有响应问题。背景图像分配到的#横幅在断点@700px上方有响应,但在该屏幕宽度下方不会调整大小,从而破坏该断点下方站点的响应 HTML: 背景图像似乎是使用ems中的高度跨多个断点缩放的。以下是一些与透视图更相关的断点: @media screen and (max-width: 840px) { #banner {height: 20em;}} @media screen and (max-width: 736px) { #banner {heigh
#横幅
在断点@700px上方有响应,但在该屏幕宽度下方不会调整大小,从而破坏该断点下方站点的响应
HTML:
背景图像似乎是使用ems中的高度跨多个断点缩放的。以下是一些与透视图更相关的断点:
@media screen and (max-width: 840px) {
#banner {height: 20em;}}
@media screen and (max-width: 736px) {
#banner {height: 18em;}}
@media screen and (max-width: 480px) {
#banner {height: 16em;}
该网站的正文具有
最小宽度:700px
。拿出它,网站无论大小都能响应。这就成功了!谢谢你的视角,我太专注于背景图像了,以至于错过了最小宽度。非常感谢,谢谢!
background-image: url("../../images/IMG_1890.jpg");
background-position: center center;
background-size: cover;
height: 28em;
text-align: center;
position: relative;
@media screen and (max-width: 840px) {
#banner {height: 20em;}}
@media screen and (max-width: 736px) {
#banner {height: 18em;}}
@media screen and (max-width: 480px) {
#banner {height: 16em;}