您好,登錄后才能下訂單哦!
這篇文章將為大家詳細(xì)講解有關(guān)HTML怎么制作一個(gè)簡單的面頁布局,小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。
互聯(lián)網(wǎng)多數(shù)的網(wǎng)頁都是由html編寫的,html配合css布局做成一個(gè)簡單的漂亮網(wǎng)頁。
代碼示例
<!DOCTYPE html> <html> <head> <title>css網(wǎng)頁布局 </title> <meta charset="utf-8"> <style> * { box-sizing: border-box; } body { margin: 0; } .header { background-color: #f1f1f1; } .topnav { overflow: hidden; background-color: #f61137; } .topnav a { float: left; color: #0017f9; padding: 10px 100px; text-decoration: none; } .topnav a:hover { background-color:#7efe51; </style> </head> <body> <div class="responsive"> <div class="img"> <a target="_blank" href="//static.runoob.com/images/demo/demo1.jpg"> <img src="//static.runoob.com/images/demo/demo1.jpg" alt="#" width="800" height="100"> </a> </div> </div> <div class="topnav"> <a href="#">圖片</a> <a href="#">視頻</a> <a href="#">關(guān)于</a> </div> <div class="responsive"> <div class="img"> <a target="_blank" href="//static.runoob.com/images/demo/demo4.jpg"> <img src="//static.runoob.com/images/demo/demo4.jpg" alt="#" width="800" height="500"> </a> </div> </div> </body> </html>
代碼效果圖如下:
代碼步驟:
1、開始HTML 源碼,<html>
標(biāo)簽語言有【開始標(biāo)簽】和【結(jié)束標(biāo)簽】,中間為標(biāo)簽的內(nèi)容,先我們輸入頭和尾。
<html> </html>
2、一個(gè)簡單的 HTML 文檔,<head>
帶有最基本的必需的元素。在中間加入標(biāo)題<title>
標(biāo)簽,在title標(biāo)題中加入網(wǎng)頁標(biāo)題名:css面頁布局,可以不寫。
<html> <head> <title>css網(wǎng)頁布局 </title> </head> </html>
3、網(wǎng)頁布局<style>
標(biāo)簽用于為 HTML 文檔定義樣式信息,創(chuàng)建高級(jí)的布局非常耗時(shí),使用模板是一個(gè)快速的話,搜索引擎可以找到很多免費(fèi)的網(wǎng)站模板。
<html> <head> <title>css網(wǎng)頁布局 </title> </head> <style>...網(wǎng)頁布局... </style> </html>
4、<body>
元素包含文檔的所有內(nèi)容,比如:文本、超鏈接、圖像、表格和列表等。
<html> <head> <title>css網(wǎng)頁布局</title> </head> <body> <p>body 元素的內(nèi)容會(huì)顯示在瀏覽器中。</p> <p>title 元素的內(nèi)容會(huì)顯示在瀏覽器的標(biāo)題欄中。</p> </body> </html>
關(guān)于“HTML怎么制作一個(gè)簡單的面頁布局”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺得文章不錯(cuò),請把它分享出去讓更多的人看到。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。