How do I change an inputs border colour without changing the style?

前端 未结 6 1378
野性不改
野性不改 2021-01-18 12:42

I\'m trying to do something pretty simply; change the border colour of an input. In both IE11 and latest stable Chrome, changing the color also changes how it looks (appears

6条回答
  •  甜味超标
    2021-01-18 13:17

    I would recommend inspecting the CSS being applied to those input elements using FireBug lite.

    http://getfirebug.com/firebuglite

    Most browsers set their own CSS as default for input boxes and it's annoyingly convoluted to say the least. Goole chrome for instance, sets an inset border and then overrides it some places in different ways depending on the side of the input box.

    If you look in the Inspect Element Computed CSS box for the input element, you will see what is applied and see how to overide it.

提交回复
热议问题