我如何从我的网站代码删除白色边框?

时间:2022-03-23 19:39:01

Here's my JSFiddle

这是我的JSFiddle

html, body {
     height: 100%;
}
    #background {
        height: 100%;
        background: url(http://phosproject.com/wp-content/themes/phos_theme/images/7.jpg); no-repeat center center fixed; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}
.button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 440px;
    height: 460px;
    margin-top: -230px; /* Half the height */
    margin-left: -220px; /* Half the width */

}

On my website the background seems to have a white border around it and makes it look bad and i was wondering how i could remove it.

在我的网站上,背景似乎是白色的边框,让它看起来很糟糕,我想知道怎么去掉它。

1 个解决方案

#1


0  

The html body has a default margin. You need to remove it.

html主体有一个默认的边界。你需要移除它。

body {
  margin: 0;
}

Updated fiddle.

更新的小提琴。

#1


0  

The html body has a default margin. You need to remove it.

html主体有一个默认的边界。你需要移除它。

body {
  margin: 0;
}

Updated fiddle.

更新的小提琴。