學習PHP課程的第四天

來源:互聯網
上載者:User

標籤:zhiye   課程   超連結   網頁   魔獸   

2016年11月10日,星期四。


    

    今天利用了新的指令<!--網站超連結-->製作出更加完善的網頁導航條。

    網站超連結:<a href="輸入超連結網址">-輸入內容-</a>

    編碼如下:


<!DOCTYPE html>

<html>

<head>

<meta charset="utf8">


<title>魔獸職業預覽</title>

</head>

<style type="text/css">

body,ul{

margin: 0px;

padding: 0px;

}


#baohan{

width: 100%

height:60px;

background-color: red;

}




#zhiye{

height: 50px;

width: 1500px;

margin: 0 auto;

background-color: red;}


li{

width: 70px;

height: 50px;

background-color: red;

float: left;

list-style: none;

text-align: center;

line-height: 50px;

margin-right: 2px;}


li:hover{background-color: orange;}


a{text-decoration: none;}


</style>





<body>

<div id="baohan">

<ol id="zhiye">

<li><a href="https://www.wowchina.com/zh-cn/game/classes/demon-hunter">戰士</a></li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/paladin">聖騎士</a></li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/hunter">法師</li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/hunter">獵人</a></li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/hunter">牧師</li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/hunter">薩滿</li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/death-knight">死亡騎士</a></li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/druid">德魯伊</a></li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/demon-hunter">惡魔獵手</a></li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/warlock">術士</a></li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/monk">武僧</a></li>

<li><a href="https://www.wowchina.com/zh-cn/game/classes/rogue">潛行者</a></li>

</ol>

</div>




</body>

</html>


    完成圖,如下:

650) this.width=650;" src="http://s5.51cto.com/wyfs02/M01/8A/0C/wKiom1gkdHGhFBdfAADGdzaNIeU552.png-wh_500x0-wm_3-wmp_4-s_92858026.png" title="2016-11-10_211930.png" alt="wKiom1gkdHGhFBdfAADGdzaNIeU552.png-wh_50" />

    實現了連結功能:

    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/8A/0D/wKiom1gkkCHTChxoAB2JC5emPTY340.png-wh_500x0-wm_3-wmp_4-s_738213283.png" title="2016-11-10_231746.png" alt="wKiom1gkkCHTChxoAB2JC5emPTY340.png-wh_50" />

    利用target="blank"錨點功能實現<開啟全新網頁保留原網頁>的功能。

    註:target(目標)預設值self

blank:開啟全新網頁保留原網頁

<body>

<div id="baohan">

<ol id="zhiye">

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/demon-hunter">戰士</a></li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/paladin">聖騎士</a></li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/hunter">法師</li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/hunter">獵人</a></li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/hunter">牧師</li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/hunter">薩滿</li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/death-knight">死亡騎士</a></li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/druid">德魯伊</a></li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/demon-hunter">惡魔獵手</a></li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/warlock">術士</a></li>

<li><a target="blank"href="https://www.wowchina.com/zh-cn/game/classes/monk">武僧</a></li>

<li><a target="blank" href="https://www.wowchina.com/zh-cn/game/classes/rogue">潛行者</a></li>

</ol>

</div>


    (可看到開啟連結後原網頁未關閉),如下:

650) this.width=650;" src="http://s1.51cto.com/wyfs02/M01/8A/09/wKioL1gkksbTCTj9AB2KpZwoFK0227.png-wh_500x0-wm_3-wmp_4-s_2546369255.png" title="2016-11-10_232814.png" alt="wKioL1gkksbTCTj9AB2KpZwoFK0227.png-wh_50" />


本文出自 “12244251” 部落格,謝絕轉載!

學習PHP課程的第四天

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.