2016-08-14 92 views
-1

我试图为我的网站做一个加载页面,但沿着顶部和左侧有一条白线。有人可以帮助我, 谢谢。帮助html和css

<DOCTYPE html> 
<html> 
<head> 
    <style> 

     html { 
      cursor: none; 
     } 

     .container { 
      background-color: black; 
      position: fixed; 
      width: 100%; 
      height: 100%; 
      z-index: 1000; 
     } 

     p { 
      color: white; 
      text-align: center; 
      position: absolute; 
      top: 0; bottom:0; left: 0; right:0; 
      font-family: courier; 
      font-weight: bold; 
     } 

     img { 
      position: absolute; 
      top: 0; bottom:0; left: 0; right:0; 
      margin: auto; 
     }  

    </style> 

</head> 
<body> 
    <div class="container"> 
      <img src="progress.gif"> 
      <p> Loading... Please wait </p> 
    </div> 

回答

1

这是默认的保证金,你可以添加

body { 
    margin: 0; 
} 

到你的CSS。

+0

非常感谢您的帮助:) – meme