gpt4 book ai didi

css - 中心 rsCaption

转载 作者:行者123 更新时间:2023-11-28 12:44:21 34 4
gpt4 key购买 nike

我目前正在尝试修改我在 Wordpress 上的 Royal Slider 插件 (http://dimsemenov.com/plugins/royal-slider/)

我的目标是将所有标题的文本居中,并使标题宽度为 100%

这是有效的代码:

<div class="rsContent">
{{image_tag}}
<div class="rsCaption">
<h3>{{title}}</h3>
<p>{{description}}</p>
</div>
{{thumbnail}}
{{html}}
{{animated_blocks}}
{{#link_url}}
<a class="rsLink" href="{{link_url}}">{{title}}</a>
{{/link_url}}
</div>

这是我真的不知道的部分:

#rsCaption { 
position: absolute;
text-align: center;

我也不确定位置。

任何指导/链接都会很棒。我是一个新手,正在尝试慢慢弄清楚这些东西。

最佳答案

首先,您有 class="rsCaption" 并且您的 css 表示 #rsCaption 用于 id。所以你的 CSS 应该是这样的:

.rsContent { 
position: relative;
/* rest of the code that already exists */

}
.rsContent .rsCaption {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
margin: 0;
}

这只是一个大胆的猜测,具体取决于您目前的情况。如果我能在某个地方看到它在运行,那将是另外一回事。

关于css - 中心 rsCaption,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17478607/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com