HTML_圖片、地圖

來源:互聯網
上載者:User

標籤:html_   圖片   建立   middle   預設   座標   tom   大小   中間   

插入圖片的基本格式為:<img src="url" />
可插入的屬性有---替換文本:alt="替換文字"
         對齊:align="bottom"(與底部對齊,預設是此方式)、"middle"(中間)、"top"(頂部)
         浮動方式:align ="left"(浮動在文本左邊)、"right"
         圖片大小:width="50" height="50"(通過width、height屬性可以對圖片進行縮放)
         將圖片用作連結:
<a href="//lastpage.html">
                   <img border="0" src="/eg_buttonnext.gif" />        //border是外邊框大小屬性
                </a>

<map> 標籤
<img src="planets.jpg" border="0" usemap="#planetmap" alt="Planets" /><map name="planetmap" id="planetmap">  <area shape="circle" coords="180,139,14" href ="venus.html" alt="Venus" />  <area shape="circle" coords="129,161,10" href ="mercur.html" alt="Mercury" />  <area shape="rect" coords="0,0,110,260" href ="sun.html" alt="Sun" /></map>
usemap 屬性與 <map> 元素的 name 或 id 屬性相關聯,以建立 <img> 與 <map> 之間的關係。# + 要使用的 <map> 元素的 name 或 id 屬性。
shape後是圖片的形狀(circle圓;rect矩形)coords指位置,大小:圓(橫座標,縱座標,半徑)矩形(左上方橫座標,左上方縱座標,右下角橫座標,右下角縱座標)

             







若是背景圖片,則格式為:<body background="/i/eg_background.jpg">

 

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.