如何让我的CSS代码与所有浏览器兼容? [英] How can I make my CSS code compatible with all browsers?

查看:114
本文介绍了如何让我的CSS代码与所有浏览器兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 p {
        margin:0;padding:0;
    }
    p#error {
        color:#FF0000;
        text-align:center;
    }
    p#success {
        color:#3983C2;
        text-align:center;
    }
    div#nav {
        background-image:url('../img/nav.png');
        background-repeat:no-repeat;
        padding-top:5px;
        padding-bottom:5px;
    }
    div#nav, a {
        text-decoration:none;
    }
    body {
        margin:0 auto;
        width:600px;
    }
    div#login, div#register {
        background-image:url('../img/form.png');
        background-repeat:repeat-y;
        padding-top:5px;
        padding-bottom:5px;
    }
    div#login table, div#register table {
        margin:0 auto;
    }
    div#login table td, div#register table td {
        text-align:right;
    }
    div#login input#btn, div#register input#btn {
        background-image:url('../img/btn.png');
        border-style:none;
        width:70px;height:25px;
    }
    div#footer {
        background-image:url('../img/footer.png');
        height:30px;
    }

这是我的CSS代码。我不知道如何使这个CSS在其他浏览器中工作,目前我在Chrome。我已经搜索了网络,发现很多页面都有相关的信息,但是这些更难理解。需要您的建议或等等。非常感谢!

Here is my CSS code. I don't know how to make this CSS work in other browsers, currently I'm working in Chrome. I already searched the net and found many pages with related information, but these are even more difficult for me to understand. Need your suggestions or etc. Thank you very much!

推荐答案

您的CSS应该在所有浏览器中工作。从浏览器到浏览器可能不会显示相同的内容。大多数开发人员使用重置来解决这个问题。

Your CSS should work in all browsers as is. It may not display the same from browser to browser. Most developers use a reset to fix that issue.

CSS RESET

http://meyerweb.com/eric/tools/css/reset/

NORMALIZE

http://necolas.github.com/normalize.css/

这篇关于如何让我的CSS代码与所有浏览器兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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