Is position 'initial' cross-browser - css

谁都会走 提交于 2019-12-21 06:47:05

问题


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



来源:https://stackoverflow.com/questions/15343487/is-position-initial-cross-browser-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!