开发者

web applications and rendering

开发者 https://www.devze.com 2023-03-13 12:26 出处:网络
I\'ve been developing on the web for a while now and most of my cross browser compatibility consists of using IE css hacks, which is not standard by any means so I\'m just curious how do you handle cr

I've been developing on the web for a while now and most of my cross browser compatibility consists of using IE css hacks, which is not standard by any means so I'm just curious how do you handle cross browser rendering issues when developing web applications? I've never worked for a larger company, so how you do think (of if you have some experience working for 开发者_如何学运维a large company) they handle these cross browser differences? I would love some professional feedback on this subject or perhaps some tips.


We start our projects by using a reset stylesheet (Eric Meyer's is good), which fixes most cross-browser display issues we've ran in to.

My personal strategy is to make everything look right in Firefox first, which usually also takes care of Webkit-based browsers, then go back in and fix IE issues using separate stylesheets linked inside of conditional comments.

For some CSS3 that IE<=8 doesn't support, we use CSS3 PIE.

Finally, if you haven't already, check out Modernizr and html5boilerplate (html5boilerplate implements Modernizr). html5boilerplate is a good starting point to help alleviate cross-browser issues.


My personal strategy is to start with a reset stylesheet (I use Eric Meyer's as well), to reset default styles by browsers.

To solve issues with particular versions of IE, I use conditional comments instead of CSS hacks, so that my styles for CSS are more likely to work in IE, if IE fixes CSS hacks.

Using a CSS framework such as Blueprint can provide basic styles that you can override with your own styles, and provides a basis for your styles so you don't have to duplicate some basic styles. It also provides good compatibility with IE's CSS quirks by using conditional comments as well.

It's usually best to test in a variety of standards-compliant browsers, and then apply CSS fixes to IE. Usually, to give pseudo-CSS3 styles to IE, you need to investigate IE's filter, a non-standard way of applying styles. Microsoft's MSDN documentation is fairly comprehensive on this note. Be wary—anti-aliasing may disappear when you use filter styles on an element.

If you need support with IE for new HTML5 tags, such as <section> and <header>, use an html5shim.

0

精彩评论

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