<a> 之理解與應用--記錄(七),--

來源:互聯網
上載者:User

<a> 之理解與應用--記錄(七),--

1.在於底線

<ul style=" list-style-type:none; margin:0;color:Gray; font-size:11px;margin-top:30px">            <li style=" float:left; position:relative; margin-left:380px; "><a href="#">關於我們</a></li>            <li style=" float:left; position:relative; margin-left:20px"><a href="#">關於我們</a></li>            <li style=" float:left; position:relative; margin-left:20px"><a href="#">聯絡我們</a></li>            <li style=" float:left; position:relative; margin-left:20px"><a href="#">人才招聘</a></li>            <li style=" float:left; position:relative; margin-left:20px"><a href="#">商家入駐</a></li>            <li style=" float:left; position:relative; margin-left:20px"><a href="#">友情連結</a></li>            <li style=" float:left; position:relative; margin-left:20px"><a href="#">冬冬購物社區</a></li>        </ul>

a
{
text-decoration: none;
}
a:hover
{
text-decoration: underline;
color:Red;
}

2.<a>的target的屬性有四個特殊值:

  • target='_blank'  瀏覽器總是開啟一個新的網頁
  • target='_self'  它使得目的文件載入並顯示在相同的架構或者視窗中
  • target='_parent'  這個目標使得文檔載入父視窗或者包含來超連結引用的架構的框架組。如果這個引用是在視窗或者在頂級架構中,那麼它與目標 _self 等效
  • target='_parent'  如果有多層父架構,直接去掉所有父架構,並重新整理頁面

3.<a>的href屬性:

  • 絕對 URL - 指向另一個網站(比如 href="http://www.example.com/index.htm")
  • 相對 URL - 指向網站內的某個檔案(href="index.htm")
  • 錨 URL - 指向頁面中的錨(href="#top"

聯繫我們

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