What CSS hacks are these?

空扰寡人 提交于 2019-12-07 03:56:32

问题


I found this in a CSS declaration code I am now partially responsible for:

margin: 0 0 0 10px;
*+margin: 4px 0 0 10px;
margin: 3px 0 0 10px\0/;

... the *+ and \0/ are what I'm looking at in particular. What are the hacks being employed here?

And is there a standard place I can look at to look at current and past CSS hacks that also lists their applicability and usefulness? I want to be able at a glance to see a difference between an on-purpose hack and simple code errors.


回答1:


margin: 3px 0 0 10px\0/;

That one is a CSS hack to specify Internet Explorer 8.

*+margin: 4px 0 0 10px;

This one is for Internet Explorer 7




回答2:


As for a list of hacks, this is pretty comprehensive, but I'm sure theres more hacks out there.



来源:https://stackoverflow.com/questions/5860304/what-css-hacks-are-these

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