小白學前端05

2017-05-11 16:33:40:
1.單擊錨,頁面將跳到第二個錨的位置:
<p><a href="#mainContent">Skip to main content</a></p>
...
<h1><a id="test" name="mainContent" href="test.html">Welcome</a></h1>
不是跳到下一個錨,而是頁面轉到第二個錨的位置

2.去掉連接的下劃線,而後在鼠標懸停在連接上或單擊連接時取消下劃線
a:link,a:visited{text-decoration: none; }
a:hover,a:focus,a:active{text-decoration: underline; }
以上實現的順序很重要,否則規則具備相同的特殊性時,後定義的規則會覆蓋
a.link a.visited a.hover a.focus a.acive :記憶:Lord Vader Hates Furry Animals

3.平時和激活後均爲虛線下劃線,懸浮和被單擊時爲實線
a:link,a:visited{text-decoration: none;  border-bottom: 1px dotted #000;}
a:hover,a:focus,a:active{ border-bottom-style: solid;}

4.一個圖片怎麼做爲按鈕的背景?

html

 

TO DENFEND --《超脫》htm

相關文章
相關標籤/搜索