Can't override css of element

后端 未结 5 673
时光取名叫无心
时光取名叫无心 2021-01-05 06:51

I have a website with a global template that contains partial templates, but now I\'m stuck with a simple CSS problem:

HTML

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-05 07:24

    Try this :

    select#test
    {
        width: 150px !important;
    }
    

    A rule that has the !important property will always be applied no matter where that rule appears in the CSS document. So if you wanted to make sure that a property always applied, you would add the !important property to the tag.

提交回复
热议问题