close
Web Standards Solutions 網頁設計標準規格
錨點
在需要指到頁面的特定部分時,標記錨點的最佳運用法
方法A:空洞的名稱
<p><a href=#oranges">About Oranges</a></p>
...
<a name="oranges"></a>
<h2>Oranges Are Tasty<h2>
...
使用空白的錨點標籤配上name屬性標記特定的連結點。
方法B:全部都在名稱之內
<p><a href=#oranges">About Oranges</a></p>
...
<h2><a name="oranges">Oranges Are Tasty</a><h2>
...
這裡要小心<a>的全域樣式,可用a:link解決
更豐富的名稱屬性:
方法C:失去名稱
<p><a href=#oranges">About Oranges</a></p>
...
<h2 id="oranges">Oranges Are Tasty<h2>
...
id屬性的功能就像name屬性,同樣能為頁面指定錨點
方法D:合而為一
<p><a href=#oranges">About Oranges</a></p>
...
<h2><a id="oranges" name="oranges">Oranges Are Tasty</a><h2>
...
更多技巧
標題屬性:title
I just read <a href="http://www.downwithwallpaper.com.tips.html" title="DownWithWallpaper.com|How to Take Down Wallpaper">
a great article</a> that gave me a few home imporovment tips.
a:link{
color: green;
text-decoration: underline overline;
font-weight: bold;
}
a:visited{
color: purple;
}
a:hover{
color: blue;
border-bottom: 1px solid blue;
}
工具提示標題
標題會被唸出來
令人又愛又恨的連結(LoVe/HAte)
排列順序:a:link(L)
a:visited(V)
a:hover(H)
a:active(A)
全站熱搜
留言列表