画廊图像带有标题。只需要围绕图像而不是字幕边框。将Divi与自定义CSS一起使用

发布于 01-18 22:28 字数 567 浏览 4 评论 0原文

我正在与Divi合作,需要一些自定义CSS。我有一个画廊墙,每个图像下方都有图像阳离子。我需要仅在图像周围获得边界。我认为我可能会将CSS放在Divi的错误位置。 我尝试了以下代码:

        border: 1px solid #707070;
        padding: 5px;
        border-radius: 5px;

哪个用代码笔有效,但在Divi中不起作用。 IVE尝试将此代码粘贴到Divi>“自定义CSS”中,在画廊中,在“高级”自定义CSS>的主要元素和画廊项目中。下图是我试图为画廊中的每个图像实现的效果。任何帮助将不胜感激。

I am working with Divi and need some custom CSS. I have a gallery wall with image cations under each image. I need to get a border around just the image. I think I might be placing the CSS in the wrong spot in Divi.
I've tried the following code:

        border: 1px solid #707070;
        padding: 5px;
        border-radius: 5px;

Which works in code pen but not in divi. Ive tried pasting this code in divi>theme options>custom css, in the gallery>advanced>custom css>main element and in gallery item. The image below is the effect I am trying to achieve for each image in the gallery. Any help would be appreciated.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

赏烟花じ飞满天2025-01-25 22:28:41

你能告诉我你的 HTML 代码吗?我认为这些属性应该只指示给 img 元素而不是Figcaption。问候!

Could you show me your HTML code please, I think those properties should only be indicated to the img element and not to figcaption. Greetings!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文