刚自学web的小白想请教下代码

敲代码的77 2020-08-08 11:23:18
介个超链接的字体颜色我设置了白色,但是为什么它会变成紫色的呢,还有无序列表前面那个点点怎么去掉 附下代码:刚学web的小白想请教下各位大佬 介个超链接的颜色我设置了白色,为什么它会变成白色的呢,还有无序列表前面那个点点怎么去掉。 附下代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>CSS样式作业</title> <style> table{ border:2px solid white; /*border-collapse:collapse;*/ width: 300px; } th{ background-color: #3cc; text-align: center; font-size:18px; line-height: 3em } td{ color:white; background-color: rgb(0,0,0); font-size:12px; } a:link{ text-decoration:none; color: rgb(255,255,255) } a:hover{ background-color: white; color: rgb(0,0,0) } </style> </head> <body> <table> <tr> <th>外国最经典的文学名著</th> </tr> <tr> <td> <ul> <li> <a href=" ">希腊神话——古希腊文明瑰宝</a ></li> <li><a href="#">伊索寓言——一部经典的寓言故事集</a ></li> <li><a href="#">荷马史诗——横亘千古的文学瑰宝</a ></li> <li><a href="#">俄狄浦斯王——古希腊悲剧的典范</a ></li> </ul> </td> </tr> </table> </body> </html>
...全文
2611 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wylwyl1108 2020-10-23
  • 打赏
  • 举报
回复
点击过的超链接的颜色确实会变成紫色,表示该超链接访问过了,设置 下访问之后的css属性就行了,a:visited{color:red;}
hookee 2020-08-10
  • 打赏
  • 举报
回复

<!DOCTYPE html>
 <html lang="en">
 <head>
 <meta charset="UTF-8">
 <title>CSS样式作业</title>
 <style>
 table{
 border:2px solid white;
 /*border-collapse:collapse;*/
 width: 300px;
 }
 th{
 background-color: #3cc;
 text-align: center;
 font-size:18px;
 line-height: 3em
 }
 td{
 color:white;
 background-color: rgb(0,0,0);
 font-size:12px;
 }
 a:visited{
 background-color: none;
 color: rgb(255,255,255)
 }
 a:link{
 text-decoration:none;
 color: rgb(255,255,255)
 }
 a:hover{
 background-color: white;
 color: rgb(0,0,0)
 }
 ul{list-style-type:none}
 </style>
 </head>
 <body>
 <table>
 <tr>
 <th>外国最经典的文学名著</th>
 </tr>
 <tr>
 <td>
 <ul>
 <li>
 <a href=" ">希腊神话——古希腊文明瑰宝</a ></li>
 <li><a href="#">伊索寓言——一部经典的寓言故事集</a ></li>
 <li><a href="#">荷马史诗——横亘千古的文学瑰宝</a ></li>
 <li><a href="#">俄狄浦斯王——古希腊悲剧的典范</a ></li>
 </ul>
 </td>
 </tr>
 </table>
 </body>
无欲吾求 2020-08-10
  • 打赏
  • 举报
回复
a {
            color: white;
}
ul {
            list-style: none
}

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧