Why do text inputs change their border attributes when a background color is applied?

后端 未结 3 1351
情深已故
情深已故 2021-01-07 05:55

Here\'s an example, I\'m looking at in in FF 3.6 and the input with background: transparent has a different border to the untouched one.

http://jsfiddl

3条回答
  •  轮回少年
    2021-01-07 06:29

    I second what Andreas says.

    I don't know why exactly this is neither. I deduct from experience that when one of the border background-color visual attributes is altered, the browser switches from "OS rendering style" mode to "create rendering rules yourself" mode. Sadly, to my knowledge there is no CSS way of getting back to the OS rendering style.

    The only way I can see to deal with this is to define a consistent ruleset for controls - which is a shame, because it's a perfectly logical choice to leave those styles rules to the user's OS.

提交回复
热议问题