搜尋
  • 登入
  • 報名
密碼重置成功

關注您感興趣的項目並了解有關它們的最新消息

如何在連結上使用文字裝飾

實例解析:

text-decoration屬性主要用於刪除連結中的底線。

使用text-decoration:none;刪除連結中的底線。

使用text-decoration:underline;為連結中新增底線。

新建檔案
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> <style> a:link {text-decoration:none;} /* unvisited link */ a:visited {text-decoration:none;} /* visited link */ a:hover {text-decoration:underline;} /* mouse over link */ a:active {text-decoration:underline;} /* selected link */ </style> </head> <body> <p><b><a href="#">This is a link</a></b></p> <p><b>注意:</b> hover必须在:link和 a:visited之后定义才有效.</p> <p><b>注意:</b>active必须在hover之后定义是有效的.</p> </body> </html>
重置程式碼
自動運行
提交
預覽 Clear