How can I remove CSS element style inline (without JavaScript)?

前端 未结 6 1011
旧时难觅i
旧时难觅i 2020-12-18 22:22

I have a style assigned for a specific HTML element in my stylesheet file, like this


label {
  width: 200px;
  color: red; 
}

In one speci

6条回答
  •  时光取名叫无心
    2020-12-18 22:32

    I don't think you can reset it to what it was before the label definition in the stylesheet, but you could give the label an id and override it in your stylesheet.

    
    
    label {
      width: 200px;
      color: red; 
    }
    
    label#status-label {
      width: auto;
      color: blue; 
    }
    

提交回复
热议问题