图像上的 CSS 百分比宽度突然停止工作?
我不知道为什么,但控制图像大小的 CSS(最引人注目的是移动屏幕上主宽屏图像横幅上的标题图像)突然停止工作了?
该网站托管在 Siteground 上,由于某种原因,所有图像的最大宽度现在为 100% 或更少?
如果我设置更大的特定像素宽度,例如,就会发生这种情况。 2900px 或更大的百分比。
这会影响所有图像,包括那些有或没有文本覆盖的图像。
在移动设备上,我通常将宽度设置为 300% +,以便它填充整个面板。
实时网站是 - https://www.hagleyartificiallawns.co.uk/
我已经花了一整天,禁用插件,更改 PHP 版本,弄乱 CSS,但它不再起作用了。昨天和前一周都运行良好 - 我是否错过了一些非常明显的东西?
有什么建议吗?
预先感谢,我想看到这个我会发疯的! :)
I have no idea why, but the CSS that controls the image size, most notable in the header images on the main widescreen image banners on mobile screens has suddenly stopped working?
The website is hosted on Siteground, for some reason, the max width of all images is now 100% or less??
This happens if I set a larger specific pixel width eg. 2900px or a larger percentage.
This is affecting all the images, including those with and without text overlays.
On mobile, I usually have the width set to 300% + so that it fills the whole panel.
The live website is - https://www.hagleyartificiallawns.co.uk/
I've spent the whole day, disabling plugins, changing PHP version, messing with the CSS, but it just doesn't work anymore. It was working fine yesterday and all week previously - am I missing something really obvious??
Any suggestions?
Thanks in advance, I think I'm going insane looking at this! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
删除图像上的所有宽度分配,以便高度可以随容器缩放:
Remove all width assignments on your image so the height can scale with the container:
在 WP 5.9.2 上,includes/css/dist/block-library/style.min.css 具有以下 CSS 声明:
您可以尝试使用替换为文件或使用自定义 css 插件。
更多读物请访问
On WP 5.9.2 the includes/css/dist/block-library/style.min.css has the following CSS declaration:
You can try to use replace with, the the file or use a plugin for custom css.
More readings at