简体   繁体   English

Oracle Apex - 更改框文本或背景的颜色

[英]Oracle Apex - Change Color of text or background of a box

the image shows a snippet of a dashboard from oracle apex.图像显示了来自 oracle apex 的仪表板片段。 In the image of the link you can see a few boxes and grey cards which have a number inside of them.在链接的图像中,您可以看到一些盒子和灰卡,里面有一个数字。 I know that there is a way to conditionally change the color of the grey card but is there a way to change the color of the box instead of the card.我知道有一种方法可以有条件地改变灰卡的颜色,但是有没有办法改变盒子而不是卡的颜色。 I want to do that because there is no correlation between the color of the card and the number inside of it.我想这样做是因为卡片的颜色和里面的数字之间没有相关性。 An alternative would be to change the color of the text (which i had to censor) either next to the card or in the subbox.另一种方法是更改​​卡片旁边或子框中的文本颜色(我必须对其进行审查)。

Here is a seperate link to the image: https://i.stack.imgur.com/VOefX.png这是图像的单独链接: https : //i.stack.imgur.com/VOefX.png

Thank you for your help:)感谢您的帮助:)

Assumptions (question contains very little info):假设(问题包含的信息很少):

  • Region of type "Cards" (20.2 and up) “卡片”类型的区域(20.2 及更高版本)
  • "box" refers to the section that spans "Body" and "Secondary Body" “box”是指跨越“Body”和“Secondary Body”的部分

An inspect of the region shows that this section has a span with class a-CardView-body .对该区域的检查表明,该部分具有a-CardView-bodya-CardView-body跨度。 Once you know this, it's relatively easy to add another class.一旦你知道了这一点,添加另一个类就相对容易了。 In Page Attributes > Execute When Page Loads, add:在页面属性>页面加载时执行,添加:

$(".a-CardView-body"). addClass("u-color-36-bg"); . .

Replace "u-color-36-bg" with a class of your preference.用您喜欢的类别替换“u-color-36-bg”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM