首页 > 解决方案 > amp-carousel-button 颜色

问题描述

我正在尝试更改 .amp-carousel-button 中箭头的背景颜色。

我们谈论“WORDPRESS”

在自定义css和在“HEAD”中添加自定义代码时,背景颜色都没有改变,但基本颜色保持不变。我可能做错了什么。

在我添加的 custum css 中:两者都是这样:

/ * Color Carousel Arrows * /
div.amp-carousel-button-prev {
background-color: rgba (150,30,30,0.5);
}
/ * Color Carousel Arrows * /
div.amp-carousel-button-next {
background-color: rgba (150,30,30,0.5);
}

以另一种方式:

/ * Color Carousel Arrows * /
.amp-carousel-button-prev {
background-color: rgba (150,30,30,0.5);
}
/ * Color Carousel Arrows * /
.amp-carousel-button-next {
background-color: rgba (150,30,30,0.5);
}

但这不起作用

所以我试着把这段代码放在网站的头部:

<style amp-custom>
div.amp-carousel-button {
background-color: rgba (150,30,30,0.5);
}
</ Style>

正如我也进入

<style amp-custom>
.amp-carousel-button {
background-color: rgba (150,30,30,0.5);
}
</ Style>

任何事物!背景颜色始终保持默认

标签: wordpressamp-html

解决方案


我在 amp-playground 中尝试过,它确实有效!

我在 amp-playground 中尝试过,它确实有效!


推荐阅读