图片没有反应

Image not responsive

我是 CSS 的新手。我已经添加了代码以使图像响应,但是当我切换到移动视图时,图像没有调整。

这是我的 css -

element.style {
width: 100%;
height: auto;
background-image: url(dummy/banner_wide.png);

不确定哪里出了问题?

你在html的head标签中添加了吗?

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>