2016-01-27 66 views

回答

1

这是你want.check这个什么尝试

<!DOCTYPE html> 
 
    <html> 
 
    <head> 
 
    \t <title></title> 
 
    </head> 
 
    
 
    <style type="text/css"> 
 
     
 
     body{ 
 
     \t margin: 0; 
 
     \t padding: 0; 
 
     } 
 
     
 
    \t div.maindiv{ 
 
    \t \t width: 100%; 
 
    \t \t height: 768px; 
 
    \t } 
 
    \t div.header{ 
 
    \t \t width: 100%; 
 
    \t \t height: 10%; 
 
    \t \t background-color: orange; 
 
    \t } 
 
    
 
    \t div.content{ 
 
    \t \t width: 100%; 
 
    \t \t height: 60%; 
 
    \t \t background-color: black; 
 
    \t } 
 
     div.footer{ 
 
     \t width: 100%; 
 
     \t height: 30%; 
 
     \t background-color: orange; 
 
     } 
 
    
 
    </style> 
 
    
 
    <body> 
 
    <div class="maindiv"> 
 
     \t <div class="header">header</div> 
 
     \t <div class="content">content</div> 
 
     \t <div class="footer">footer</div> 
 
    
 
    </div> 
 
    
 
    </body> 
 
    </html>

+0

是的,就是这样。谢谢! – m00t13