为什么我的网站在其他浏览器上看起来不好? [英] Why my site doesn't look good on other browsers?

查看:139
本文介绍了为什么我的网站在其他浏览器上看起来不好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正在开发我的网站,并考虑将FireFox作为主要测试区,但是我测试它在Chrome和IE9的结果是不同的。在Chrome上,一个图层不会坐在其位置,一旦我打开页面,但一旦刷新它适合我想要的地方。奇怪?而在IE上的一个div(左边的)看起来有一个更高的边缘,使它离其他div太远,字体不同,这使得一些字更大,不适合边框。什么是最好的想法,使我的父亲在所有浏览器看起来不错,哪个浏览器应该考虑我的主要测试区。

I'm now developing my site and was considering FireFox as the main testing zone, but while I tested it on Chrome and IE9 the results were different. On Chrome one of the layers doesn't sit in its place once I open the page but once I refresh it fits exactly where I want it to be. Strange? While on IE one of the divs (the left one) appears to have a higher margin to the left making it too far from the other divs and the font is different which makes some of the words bigger and doesn't fit in the borders. What's the best idea to make my sire looks good on all browsers and which browser should I consider my main testing zone.

P.S:为什么人们投票选择我的问题?我们都在学习。

P.S: Why people are voting down for my question? We're all learning.

推荐答案

首先,

应该使用css中的reset / normalize脚本。一个好的是 Eric Meyers的

You should use a reset / normalize script in your css. A good one is Eric Meyers's.

将这包含在样式表的开头。

Include this at the beginning of your stylesheet.

/* http://meyerweb.com/eric/tools/css/reset/ 
    v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, 
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
   line-height: 1;
}
ol, ul {
   list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0; 
}

这篇关于为什么我的网站在其他浏览器上看起来不好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆