麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 網站 > WEB開發 > 正文

一起學WEB(八) 一個網頁練習(一)

2024-04-27 15:13:10
字體:
來源:轉載
供稿:網友

一個網頁練習(一)

    關于CSS應該了解的最基本的東西已經講過了,從這次開始,通過一個練習來講解HTML和CSS的更多運用。

 

    首先在上一次的基礎上繼續完善網站,主要是針對主頁lounge進行。先給頁面添加一些新內容。代碼如下:

<!doctype html><html>	<head>		<meta charset="utf-8">		<title>Head First Lounge</title>		<link type="text/css" rel="stylesheet" href="lounge.css">		</head>	<body>		<p>			<img src="images/logo.gif" alt="Head First Lounge">		</p>		<h1>Welcome to the New and ImPRoved Head First Lounge</h1>		<p>			The Head First Lounge is, no doubt, the biggest trendsetter in Webville. 			Stop in to sample the eclectic offering of elixirs, teas, and coffees,			or, stay a bit longer and enjoy the multicultural culinary menu that 			combines a harmony of taste, texture, and color with the best in fresh			and healthy ingredients.  		</p>		<p>		  During your stay at the lounge, you'll enjoy a smooth mixture of 		  ambient and mystic sounds, filling the lounge and adding an extra dimension 		  to your dining experience. The decor surrounds you with the relaxing sentiments 		  of sights from eras past. And, don't forget, the lounge offers free wireless 		  access to the Internet, so bring your laptop.  		</p>		<p>		  Our guarantee: at the lounge, we're committed to providing you, 		  our guest, with an exceptional experience every time you visit. 		  Whether you're just stopping by to check in on email over an 		  elixir, or are here for an out-of-the-ordinary dinner, you'll 		  find our knowledgeable service staff pay attention to every detail. 		  If you're not fully satisfied, have a Blueberry Bliss Elixir on us.		</p>		<p>		  But that's not all; at night, join us in the backroom as our resident 		  DJ spins a choice selection of trance and drum&bass beats across 		  our spacious tiki-themed dance floor. Or just hang out in one of our 		  comfy white vinyl booths at the dance bar. You can have your elixirs 		  delivered from the main lounge right to the dance floor. If you've 		  had enough of the beat, just head back to the lounge area to relax.		  And, no matter where you find yourself in the lounge, you'll always be 		  connected with our wireless Internet access.		</p>		<p>		  Now that you've experienced the lounge <em>virtually</em>, isn't		  it time to check us out <em>for real</em>? We're located right 		  in the heart of Webville, and we've create some 		  <a href="about/directions.html" title="Detailed Directions to the Lounge">detailed directions</a> 		  to get you here in record time. No reservations necessary; 		  come and join us anytime.		</p>		<h2>Weekly Elixir Specials</h2>		<p>			<img src="images/yellow.gif" alt="Lemon Breeze Elixir">		</p>		<h3>Lemon Breeze</h3>		<p>		  The ultimate healthy drink, this elixir combines		  herbal botanicals, minerals, and vitamins with		  a twist of lemon into a smooth citrus wonder		  that will keep your immune system going all		  day and all night.		</p>		<p>		<img src="images/chai.gif" alt="Chai Chiller Elixir">		</p>		<h3>Chai Chiller</h3>		<p>		  Not your traditional chai, this elixir mixes maté		  with chai spices and adds an extra chocolate kick for		  a caffeinated taste sensation on ice.		</p>		<p>		  <img src="images/black.gif" alt="Black Brain Brew Elixir">		</p>		<h3>Black Brain Brew</h3>		<p>		  Want to boost your memory?  Try our Black Brain Brew		  elixir, made with black oolong tea and just a touch		  of espresso.  Your brain will thank you for the boost.		</p>		<p>		  Join us any evening for these and all our 		  other wonderful 		  <a href="beverages/elixir.html" 			 title="Head First Lounge Elixirs">elixirs</a>.		</p>		<h2>What's playing at the Lounge</h2>		<p>		  We're frequently asked about the music we play at the lounge, and no wonder, 		  it's great stuff. Just for you, we keep a list here on the site, updated weekly. 		  Enjoy.		</p>		<ul>													<!--在網頁中增加了一個無序列表<ul>(Unorder List與之相對的是有序列表<ol> Order List-->			<li>Buddha Bar, Claude Challe</li>					<!--<li>為列表元素List Item)-->			<li>When It Falls, Zero 7</li>			<li>Earth 7, L.T.J Bukem</li>			<li>Le Roi Est Mort, Vive Le Roi!, Enigma</li>			<li>Music For Airports, Brian Eno</li>		</ul>		<p>			&copy; 2012, Head First Lounge<br>			All trademarks and registered trademarks appearing on this site are 			the property of their respective owners.		</p>	</body><html>

lounge.html代碼

    這次內容可變化了不少,可以說是大換血。現在網頁不但有了自己的logo,文字內容也分為了四部分:主頁介紹一直都有(不過內容增加了不少);下面又添加了一個飲料的介紹;第三部分增加了一個列表(這個是HTML的新內容);最后是頁腳部分,這里包含了版權聲明信息。

    內容做了改變,網頁的外觀和配色也隨之logo的加入做了重新設計,相應的CSS如下:

body {	font-size: small;	font-family: Verdana, Helvetica, Arial, sans-serif;  /*設置了多種備用字體,以適應不同的客戶系統*/	line-height: 1.6em;		/*設置了1.6倍的行高*/}h1,h2 {	color: #007e7e;		/*與logo顏色一致的顏色*/}h1 {	font-size: 150%;	/*內容字體的150%大*/}h2 {	font-size: 130%;}lounge.css代碼

經過這些修改以后網頁效果如圖:

    先來講一個知識點,列表。他又分為兩個種類,有序列表<ol>,order list;無序列表<ul>,unorder list。他們都在內容中嵌套列表項<li>,list item。所謂有序列表是指其中的列表項是以1、2、3...的序號開頭的,而無序列表則是以點號(如上圖)或者其他圖形符號開頭。

    網頁中還有一個“?”符號(頁腳聲明版權信息處),在HTML代碼中他是以“&copy;”表示的,這種表示特殊字符的方法叫做字符實體,通常用他來表示一些鍵盤上沒有的字符,或者有特殊用途的字符。例如:“<”“>”分別用“&lt;”、“&gt;”表示,因為在HTML中“<”“>”用來標識元素,再作為內容出現會引發歧義。關于字符實體可以通過http://www.Vevbs.com/tags/ref_entities.asp和http://www.unicode.org/charts 進行查詢。

現在,網頁中HTML的內容已經充實完了,但我們最終要達到的效果如下圖:

    看來還差得遠,需要通過CSS來改變網頁的外觀。下一次我們就來進行這些操作。


上一篇:哈哈

下一篇:Angularjs筆記

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 亚洲成人久久精品 | 中文字幕网站在线 | 国产88久久久国产精品免费二区 | 久久欧美亚洲另类专区91大神 | 国产精选电影免费在线观看网站 | 91精品国产九九九久久久亚洲 | 免费国产网站 | 一本到免费视频 | gogo全球大胆高清人露出91 | 国av在线 | 日韩做爰视频免费 | av不卡毛片 | 一级全毛片 | 看免费黄色一级片 | 久久久久久久久久久久久久av | 国产午夜精品久久久久婷 | 国产成人精品无人区一区 | 美女黄污视频 | 国产成人在线免费观看视频 | 1024亚洲天堂 | 天天色人人爱 | 亚洲一级电影在线观看 | 欧美黄色性视频 | 久久丝袜脚交足黄网站免费 | 视频在线91 | 久久久久久久亚洲精品 | 久久精品国产精品亚洲 | 国产亚洲精品久久久久婷婷瑜伽 | 视频一区二区视频 | xxx日本视频 | 999久久国精品免费观看网站 | 国产精品免费一区二区三区四区 | 成人毛片av在线 | 色柚视频网站ww色 | 538在线精品 | 国产99久久久久久免费看农村 | 日本在线免费观看视频 | 亚洲欧美日韩中文在线 | 国产v综合v亚洲欧美久久 | 一级电影在线观看 | sesee99 |