How to remove all inherited and computed styles from an element?

前端 未结 2 1022
臣服心动
臣服心动 2021-01-12 18:27

The page has the following CSS:

input[type=text]
{
    display: inline; padding: 7px; background-color: #f6f6f6; font-size: 12px; letter-spacing: 1px; border         


        
2条回答
  •  醉酒成梦
    2021-01-12 19:00

    As you can see at this link: http://www.w3.org/TR/CSS2/cascade.html#specificity, all selectors has specificity value. So, if you write such css rule: #txt1 {}, you can reset all unnecessary values.

提交回复
热议问题