How does element ui modify the color of a single label

I made a form with element ui, in which there are many label, who just want to change the color of one of the label to red, but several methods don"t work. I have tried to add a class to label, but it doesn"t work. Do you know which god?

Css
Apr.05,2021

I tried it. It's OK to write like this. Let's give you a reference.

style

<style>
    .redItem .el-form-item__label{
        color: red;
    }
</style>

template

<el-form label-width="80px" :model="formLabelAlign">
                <el-form-item label="">
                    <el-input v-model="formLabelAlign.name"></el-input>
                </el-form-item>
                <el-form-item label="" class="redItem">
                    <el-input v-model="formLabelAlign.region"></el-input>
                </el-form-item>
                <el-form-item label="">
                    <el-input v-model="formLabelAlign.type"></el-input>
                </el-form-item>
</el-form>

js

data() {
     return {
           formLabelAlign: {
                 name: '',
                 region: '',
                 type: ''
           }
     };
},

result:

clipboard.png


possible reasons:
1, the priority of css is not enough and is overridden, and you need to add enough selector nesting (or use important), to ensure that the priority of css is higher than element ui's css
2). The use of < style scoped > < / style > scoped attribute in the vue component limits the style scope of the component and cannot work on other components

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e54120-45280.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e54120-45280.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?