網上書店Html網頁—— table實現

Renaway發表於2018-02-20

這個是網上某Java web學習視訊裡的第一個專案,覺得效果還行,特別適合新手練手,就記錄下來。

效果:


程式碼:

<html>
<head>
<meta charset=UTF-8">
<title>圖書商城</title>
</head>
<body>

	<!-- 整個頁面 -->
	<div id="page">
		<!-- top -->
		<div id="top">
			<table width="100%">
				<tr>
					<td width="70%">
						<img alt="logo" src="images/logo.png" />
					</td>
					<td>
						<img alt="cart" src="images/cart.gif">
						<a href="#">購物車</a>|
						<a href="#">幫助中心</a>|
						<a href="#">我的賬戶</a>|
						<a href="#">新使用者註冊</a>
					</td>
				</tr>
			</table>
		</div>
		<!-- menu -->
		<div id="menu">
			<table width="100%" bgcolor="#1C3F09">
				<tr align="center">
					<td>
						<a href="#"><font color="#ffffff">文學</font></a>  
						<a href="#"><font color="#ffffff">生活</font></a>  
						<a href="#"><font color="#ffffff">計算機</font></a>  
						<a href="#"><font color="#ffffff">外語</font></a>  
						<a href="#"><font color="#ffffff">經管</font></a>  
						<a href="#"><font color="#ffffff">勵志</font></a>  
						<a href="#"><font color="#ffffff">社科</font></a>  
						<a href="#"><font color="#ffffff">學術</font></a>  
						<a href="#"><font color="#ffffff">少兒</font></a>  
						<a href="#"><font color="#ffffff">藝術</font></a>  
						<a href="#"><font color="#ffffff">原版</font></a>  
						<a href="#"><font color="#ffffff">科技</font></a>  
						<a href="#"><font color="#ffffff">考試</font></a>  
						<a href="#"><font color="#ffffff">生活百科</font></a>  
						<a href="#"><font color="yellow">全部商品目錄</font></a>
					</td>
				</tr>
			</table>
		</div>
		<!-- search -->
		<div id="search">
			<table width="100%" bgcolor="#B6B684">
				<tr align="right">
					<td>
						Search
						<input type="text"/>
						<input type="button" value="搜尋"/>
						     
					</td>
				</tr>
			</table>
			
		</div>
		<!-- content -->
		<div id="content">
			<div align="right">
				首頁 > 旅遊 > 圖書列表     
			</div>
			<h1>商品目錄</h1>
			<hr/>
			<h1>計算機類</h1>
			<span>共xxx種商品</span>
			<hr/>
			<div>
				<img alt="productlist" src="images/productlist.gif" width="100%">
			</div>
			<div>
				<table width="100%">
					<tr align="center">
						<td>
							<div>
								<img alt="book" src="bookcover/101.jpg">
							</div>
							<div>
								<span>書名:xxx</span><br/>
								<span>售價:xxx</span>
							</div>
						</td>
						<td>
							<div>
								<img alt="book" src="bookcover/102.jpg">
							</div>
							<div>
								<span>書名:xxx</span><br/>
								<span>售價:xxx</span>
							</div>
						</td>
						<td>
							<div>
								<img alt="book" src="bookcover/103.jpg">
							</div>
							<div>
								<span>書名:xxx</span><br/>
								<span>售價:xxx</span>
							</div>
						</td>
						<td>
							<div>
								<img alt="book" src="bookcover/104.jpg">
							</div>
							<div>
								<span>書名:xxx</span><br/>
								<span>售價:xxx</span>
							</div>
						</td>
						
					</tr>
					
					<tr align="center">
						<td>
							<div>
								<img alt="book" src="bookcover/105.jpg">
							</div>
							<div>
								<span>書名:xxx</span><br/>
								<span>售價:xxx</span>
							</div>
						</td>
						<td>
							<div>
								<img alt="book" src="bookcover/106.jpg">
							</div>
							<div>
								<span>書名:xxx</span><br/>
								<span>售價:xxx</span>
							</div>
						</td>
						<td>
							<div>
								<img alt="book" src="bookcover/107.jpg">
							</div>
							<div>
								<span>書名:xxx</span><br/>
								<span>售價:xxx</span>
							</div>
						</td>
						<td>
							<div>
								<img alt="book" src="bookcover/108.jpg" width="130" height="197">
							</div>
							<div>
								<span>書名:xxx</span><br/>
								<span>售價:xxx</span>
							</div>
						</td>
						
					</tr>
				</table>
			</div>
		</div>
		
		<!-- bottom -->
		<div id="bottom">
			<table width="100%" bgcolor="#EFEEDC">
				<tr>
					<td rowspan="2">
						      
						<img alt="logo" src="images/logo.png">
					</td>
					<td>
						CONTACT US
					</td>
				</tr>
				<tr>
					<td>
						copyright 2008 &copy; BookStore All Rights RESERVED
					</td>
				</tr>
			</table>
		</div>
		
		
	</div>

</body>
</html>

程式碼裡的圖片資源見:

http://download.csdn.net/download/richard1997/10253770

相關文章