Home > Web Front-end > HTML Tutorial > 为什么网页顶部会有一行空白的部分?_html/css_WEB-ITnose

为什么网页顶部会有一行空白的部分?_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:34:05
Original
1543 people have browsed it

如图,白色箭头指示的部分!


nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



活动







  
  
    
    
    
  
 
       codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" 
height="252" width="547" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
        
        
        
        
         pluginspage="http://www.macromedia.com/go/getflashplayer" 
type="application/x-shockwave-flash" width="547" height="252" 
wmode="transparent" menu="flase">
      
      

        
      style="Z-INDEX: 4; LEFT: 596px; WIDTH: 462px; POSITION: absolute; TOP: 13px; HEIGHT: 195px">
          
            
            
            
            
          

      
 


  
  
    
    
    
  
 
      
      
        
        
        
      
    
为什么网页顶部会有一行空白的部分?_html/css_WEB-ITnose
        
        
为什么网页顶部会有一行空白的部分?_html/css_WEB-ITnose

    



    


    

    
      
      
        
      
    



            

    
    


      

                  

                         type="password" class="STYLE12" size="14" maxlength="4" />
            

                   

                
            
            

注:
              <script> <br /> </script>
            


          


  

  

        为什么网页顶部会有一行空白的部分?_html/css_WEB-ITnose/span>

        

        温馨提示:


        

        

        
          
          
            
            
          
        
增值电信业务经营许可证:粤B2-20090059 B2-20090028

  Copyright © 1998 - 2012 Tencent. All Rights   Reserved

              粤府新函[2001]87号 粤网文[2011]0483-070号 网络视听许可证1904073号
 

            
为什么网页顶部会有一行空白的部分?_html/css_WEB-ITnose

      
 



回复讨论(解决方案)

body有默认的margin
设置一下body{margin:0}就行了

margin,即页的边距,设置为0表示没有边距.

*{margin:0; padding:0;}

body有默认的margin
设置一下body{margin:0}就行了
加上这个就好了

body{margin:0; padding:0;}

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template