7.css超連結偽類
阿新 • • 發佈:2021-10-02
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>超連結偽類</title>
6 </head>
7 <style>
8 body a{
9 text-decoration: none;
10 color: black;
11 font-weight: bold;
12 }
13 /*a:hover(重點)滑鼠懸浮時字型的狀態 */
14 a:hover{
15 color: green;
16 /*font-size: 30px; 滑鼠懸浮時字型可變大*/
17 }
18 /*a:active滑鼠點選時字型的狀態*/
19 a:active{
20 color: red;
21 }
22 /*text-shadow陰影顏色*/
23 #price{
24 text-shadow: 10px 0px 10px; /*水平偏移 垂直偏移 陰影半徑*/
25 }
26
27
28 </style>
29
30 <body>
31 <a href="#">
32 <img src="images/a.png" alt="java開發" title="java">
33 </a>
34
35 <p>
36 <a href="#">碼出高效:Java開發手冊</a>
37 </p>
38
39 <p class="p2">
40 <a href="">作者:孤盡老師</a>
41 </p>
42
43 <p id="price">
44 價格:¥99
45 </p>
46
47 </body>
48 </html>