小白学前端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.一个图片怎么作为按钮的背景?

TO DENFEND --《超脱》

原文地址:https://www.cnblogs.com/giggling/p/6843527.html