Is position 'initial' cross-browser - css

2019-04-03 03:46发布

问题:

I have a css conflict, so I have to go against an absolute positioning property that deals with some class .myclass. But in one case, I want a div with .myclass class to have a no absolute positioning. So I put position: initial, which works in Chrome, but is it cross-browser? I googled it and found nothing really precise.

回答1:

The default for position is position: static;



回答2:

The initial keyword was introduced in 2011 in the Cascading and Inheritance Module -- it's supported in FF 19+, Chrome, Safari, Opera 15+ but is currently not supported in any version of IE.



回答3:

Even IE 11 gives me the 'squiggles' for this one. Changing to static gave me the desired behavior.

Chrome actually suggests it as an acceptable property in its dropdown