我在我的主页上使用了一个4列的本地wordpress图库:https://www.peace-ed-campaign.org/ (请参见滑块下方)。
在移动设备上查看时,这4列/图像并排显示,缩小到无用的程度。我希望手机能够快速响应2张或1张图像。。。
我在这里看到了一些关于这个的线索。。。但所有答案都可以追溯到2018年。似乎再也没有了。有人有什么建议吗?
我尝试过的其他线程:
How to Make Wordpress Default gallery responsive on mobile?
Making WordPress Gallery (.gallery-item) Responsive?
目前尝试此操作时运气不佳:/* For displaying single column on mobile */
@media only screen and (max-width: 480px) {
.gallery-columns-4 .gallery-item {
width: 100%;
}
}
.gallery-columns-4 .gallery-item:nth-child(4n+1) {
clear: none;
}