Heim  >  Artikel  >  Web-Frontend  >  So gestalten Sie HTML

So gestalten Sie HTML

墨辰丷
墨辰丷Original
2018-05-16 09:35:051648Durchsuche

In diesem Artikel wird hauptsächlich das Layout von HTML vorgestellt. Interessierte Freunde können darauf verweisen.

  1. p-Layout

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="utf-8">
<title></title>
<style>
body{margin: 0; padding: 0;}
#header{width:100%; height: 90px; background: #b19f9d; }
#nav{margin: 0 auto; width:70%; height: 90px; background: #fcf;}
.content{width: 950px; height: 900px; background: #847369; margin: 0 auto;}
.left{width:30%; height: 900px; background: #decfd4; float: left;}
.right{width: 70%; height: 900px; background: #b3a19d; float: left;}
footer{width:100%; height: 150px; background: #a8817a;}
</style>
</head>
<body>
<header id="header">
<nav id="nav">空空</nav>
</header>
<p class="content">
<p class="left"></p>
<p class="right"></p>
</p>
<footer></footer>
</body>
</html>

2.div-Layout

<!DOCTYPE html>  
<html>  
<head lang="en">  
    <meta charset="utf-8">  
    <title></title>  
    <style>  
        body{margin: 0; padding: 0;}  
        #header{width:100%; height: 90px; background: #b19f9d; }  
        #nav{margin: 0 auto; width:70%; height: 90px; background: #fcf;}  
        .content{width: 950px; height: 900px; background: #847369; margin: 0 auto;}  
        .left{width:30%; height: 900px; background: #decfd4; float: left;}  
        .right{width: 70%; height: 900px; background: #b3a19d; float: left;}  
        footer{width:100%; height: 150px; background: #a8817a;}  
    </style>  
</head>  
  
<body>  
    <header id="header">  
        <nav id="nav">空空</nav>  
    </header>  
    <div class="content">  
        <div class="left"></div>  
        <div class="right"></div>  
    </div>  
    <footer></footer>  
</body>      
</html>

3.table-Layout

<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="utf-8">
	<title></title>
	<style>
		
	</style>
</head>

<body marginheight="0px" marginwidth="0px">
	<table width="100%" height="950px" style="background-color:gray">
		<tr>
			<td colspan="2" width="100%" height="10%" style="background-color: aqua" ><td>
		</tr>
		<tr>
			<td  width="20%" height="80%" style="background-color: blue" ><td>
			<td  width="80%" height="80%" style="background-color: blue" ><td>
		</tr>
		<tr>
			<td colspan="2" width="100%" height="10%" style="background-color: black" ><td>
		</tr>
	
	</table>
</body>


</html>
rrree

Verwandt Empfohlen:

Frage: Über die HTML-Layout-Implementierung_html/css_WEB-ITnose eines Forumfreundes

HTML-Layoutrechner (div+css)_html /css_WEB-ITnose

, HTML-Layoutproblem. _html/css_WEB-ITnose

Das obige ist der detaillierte Inhalt vonSo gestalten Sie HTML. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn