Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的网站使用 wordpress.org 和 bluehost:www.thekatsup.com
主页是一堆专辑封面,然后单击专辑,它会打开带有歌曲封面图片、音频链接和下载链接的帖子。
图片是通过“特色图片”选项设置的,所以我不能通过 HTML 在帖子中更改它,它必须通过 CSS 完成。
通过玩弄它,我发现玩弄CSS 的这个(屏幕截图)部分会在专辑封面周围移动,但随后它也会移动我在帖子中的其他图像。
有没有办法让我所有专辑的专辑封面居中?
display: block;
会成功的
你的规则:
.post img { background:#fff; border:0 solid rgba(0,0,0,0.2); box-shadow:0 0 1px rgba(0,0,0,0.1); padding:3px; display: block; margin:0 auto; margin-bottom:15px; position:relative; z-index:5; }