开发者

Can you use the browser specific prefix in front of all css tags?

开发者 https://www.devze.com 2023-01-06 06:12 出处:网络
Can you use the browser specific prefix in front of all standard开发者_如何转开发 tags? e.g. #div{

Can you use the browser specific prefix in front of all standard开发者_如何转开发 tags?

e.g.

#div{

 padding:20px;
-moz-padding-bottom:10px;

} 

is the above valid CSS for ensuring Firefox has a different bottom padding to all other browsers?


No, it's not a prefix for targetting a browser, it's a prefix that is used for specific non-standard properties like -moz-opacity or -moz-padding-start. It's not available for the standard properties.


First, no, there isn't a prefix for things that are standardized, since they're the same property cross-browser (or should be, don't take this for granted in IE).

Instead of what you're after with this prefix, I'd instead look at a completely different approach...taking out the differences in rendering, instead of trying to fix them, at least as many as possible.

Take a look at a CSS reset stylesheet, to normalize the padding and such across browsers, then look at fixing any remaining quirks.


You can always do it, but the style will be ignored by browsers who don't understand it and the CSS won't pass CSS Validation.


This might be of interest.

-webkit-text-stroke 

Works in Firefox browsers as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消