如何将nav-bloc中的bgc颜色从胭脂红 - 粉红色更改为红色? [英] How do I change the bgc color in nav-bloc from carmine-pink to red?

查看:181
本文介绍了如何将nav-bloc中的bgc颜色从胭脂红 - 粉红色更改为红色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是现有代码。我确信这有一个简单的答案,但我对.js完全没有经验。

Here is the existing code. I'm sure this has a simple answer, but I am completely inexperienced with .js.

<!-- Navigation Bloc -->
    <div class="bloc bgc-carmine-pink d-bloc" id="nav-bloc">
        <div class="container">
            
        </div>
    </div>
    <!-- Navigation Bloc END -->

< br $> b $ b

我尝试过的事情:



我尝试了改变的明显解决方案胭脂红 - 粉红色到红色,但这只是让它变白了。我在CSS或JS中找不到对此属性的任何引用。



What I have tried:

I tried the obvious solution of changing "carmine-pink" to "red," but that just made it white. I can't find any reference to this attribute in the CSS or JS.

推荐答案

所以bgc-carmine-pink是一个类。如果这个班级目前正在制作胭脂红,那么它必须存在于某个地方。



无论如何,如果您只需要将背景设为红色,那么您可以在css文件中创建一个名为bgc-red的新类,并设置背景颜色方式。



例如,如果你使用styles.css,你会把它放在.css文件中



So bgc-carmine-pink is a class. If this class is currently making it "carmine pink" then it has to exist somewhere.

Regardless, if all you need to do is make the background red then you can create a new class called bgc-red in a css file and set the background color that way.

For example, if you styles.css you would put this in the .css file

.bgc-red {
    background-color:#FF0000;
}





然后在你的html中你可以使用bgc-red类而不是bgc-carmine-pink类来处理你的div变成红色而不是红色粉红色。



Then in your html you can use bgc-red class instead of bgc-carmine-pink class to handle your div becoming red instead of reddish pink.


这篇关于如何将nav-bloc中的bgc颜色从胭脂红 - 粉红色更改为红色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆