问题
i have a css class:
text_css
in which i want to apply the inherit property.this is working fine for IE8 and IE9. i know inherit dont work for IE7.
can anyone suggest any workaround for this?
回答1:
The workaround is to set the property to the specific value that should be inherited. Whether this is feasible depends on the context.
For example, if you would like to have input
elements have the same font family as the surrounding content, you can use input { font-family: inherit; }
, though this does not work on IE7 (big issue?). But mostly people want to set the overall font family anyway, so you could simply set e.g. body, input { font-family: Calibri, sans-serif; }
.
To get better suggestions, please specify the context and the purpose of using inherit
. It is a rarely needed value.
来源:https://stackoverflow.com/questions/11650217/is-there-a-workaround-for-font-family-inherit-for-ie7