Making CSS for one website to support for all browsers in different version is really difficult. Especially, it needs to have different browsers set up. I just wonder is it possible to test the CSS and make sure it works with all browsers without open each browser and manually check the layout? or Is there any quick or standard way to do this?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
A few important things to get you started on your journey:
Once I started doing these things, making my site work the same across browsers got a whole lot easier. No matter what, however, you will have to check them all. There's just no way around that.
You cant really get round human UI testing. I agree with the others that you should be standards compliant and reset css.
Rarely will you get HTML + CSS to render exactly the same across all browsers and on all platforms, purely due to the idiosyncrasies of each browsers. But, just because there are slight rendering differences, doesn't necessarily mean something is wrong, this is a good reason for human UI testing.
I suggest using one of the ready to use Front-End Development Frameworks like Twitter Bootstrap or Foundation. Both are well documented and pretested , so this will reduce the pain of testing.
They contain :
CSS Reset/Normalize
Ready to use components (Buttons, Form Elements, Menus ... etc ).
Grid Layout (Which is the perfect way to arrange stuff in your web page).
JavaScript.
Of course you will need to do your own testing as you tweak those frameworks, in addition to all tools mentioned above, i suggest IE-Tester , really awesome debugging tool for IE (Which is the source of the pain).
Finally, And for the sake of perfection , it's better to test your website (as possible as you can) cross all browsers and devices specially if your doing responsive design.
You have no choice but to do it! That's why web designers salary's is usually high x-)
There's not really a standard way to do this - it's just the nature of the beast; however, Adobe is currently working on BrowserLabs which should help to solve this exact issue.
margin-bottom. Because margins of adjacent elements collapse into one another, making the positioning somewhat unpredictable for novices.
you can download shiv.js form this browser compact
browser compatibility testing tools:
http://crossbrowsertesting.com/
http://browsershots.org/
http://www.browsercam.com/
http://caniuse.com
http://www.findmebyip.com/litmus/