如何在所有浏览器

时间:2015-11-04 09:23:42

标签: html css html5 css3 cross-browser

我潜水了一张照片。我在div类full_logo_login中给出了保证金。它适用于firefox,但不适用于chrome;我的CSSs如下:

.full_logo_login{
    height: 345px;
     margin: 7% 0 7% 23%;
 }
.full_logo_login > img {
 height: 345px;
 width: 345px;
 }

保证金:7%0 7%23%; 在Firefox中完美运行,但在Chrome中,它无效。 chrome希望保证金:2%0 7%23%; 完美运作。所以我写了这个CSS:

.full_logo_login{
    height: 345px;
     -webkit-margin:2% 0 7% 23% !important;
     margin: 7% 0 7% 23%;
 }
.full_logo_login > img {
 height: 345px;
 width: 345px;
 }

但是现在我的Chrome浏览器仍无法正常工作,Chrome现在仍然接受保证金:7%0 7%23%; 我的完整代码是:

<style type="text/css">
.full_login_box {
  background: #202144 none repeat scroll 0 0 !important;
  display: inline-flex;
  height: 400px;
  margin: 7% auto;
  width: 100% !important;
}
.full_logo_login{
    height: 345px;
     -webkit-margin:2% 0 7% 23% !important;
     margin: 7% 0 7% 23%;
 }
.full_logo_login > img {
 height: 345px;
 width: 345px;
 }
</style>

html:


<div class="full_login_box">
    <div class="full_logo_login">
        <img src="img/loginlogo.png">
    </div>
 </div>

1 个答案:

答案 0 :(得分:0)

我得到了答案 需要使用此css -webkit-margin-before:2%

相关问题