HTML——連結&映像

來源:互聯網
上載者:User

標籤:

一、連結

1.新頁面開啟連結

<a href="http://www.w3school.com.cn/" target="_blank">Visit W3School!</a>

2.本頁面,name為"C4"處開啟連結

<p><a href="#C4">查看 Chapter 4。</a></p><h2>Chapter 1</h2><p>This chapter explains ba bla bla</p><h2><a name="C4">Chapter 4</a></h2><p>This chapter explains ba bla bla</p>

3.跳出架構

<a href="/index.html"target="_top">請點擊這裡!</a> 

4.發送郵件連結

<a href="mailto:[email protected]?subject=Hello%20again">發送郵件</a>

5.複雜的郵件連結

<a href="mailto:[email protected][email protected]&[email protected]&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party!">發送郵件!</a>

  

二、映像

1.圖片背景

<body background="/i/eg_background.jpg"><h3>映像背景</h3><p>gif 和 jpg 檔案均可用作 HTML 背景。</p><p>如果映像小於頁面,映像會進行重複。</p></body>

2.圖片位置

文本中位置:bottom(預設)、middle、top

段落中浮動:left、right

<p>映像 <img src="/i/eg_cute.gif" align="bottom"> 在文本中</p>

3.圖片替換文本

<img src="/i/eg_goleft123.gif" alt="向左轉" />

4.圖片連結  

<a href="/example/html/lastpage.html">  <img border="0" src="/i/eg_buttonnext.gif" /></a>

5.建立影像地圖

img 元素中的 "usemap" 屬性引用 map 元素中的 "id" 或 "name" 屬性(根據瀏覽器),

所以我們同時向 map 元素添加了 "id" 和 "name" 屬性

map該name元素,擷取圖片圓形地區,添加連結。

<imgsrc="/i/eg_planets.jpg"border="0" usemap="#planetmap"alt="Planets" /><map name="planetmap" id="planetmap"><areashape="circle"coords="180,139,14"href ="/example/html/venus.html"target ="_blank"alt="Venus" /><areashape="circle"coords="129,161,10"href ="/example/html/mercur.html"target ="_blank"alt="Mercury" /></map>

6.把映像轉換為影像地圖

<p>請把滑鼠移動到映像上,看一下狀態列的座標如何變化。</p><a href="/example/html/html_ismap.html"><img src="/i/eg_planets.jpg" ismap /></a>

映像標籤:  

<img> 定義映像。
<map> 定義映像地圖。
<area> 定義映像地圖中的可點擊地區

  

  

  

  

HTML——連結&映像

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.