马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 weiter 于 2020-3-4 07:30 编辑
不造为什么我在程序里已经按照实例加了:link,但是不知道为什么:link好像失效了,以下是代码和效果,求大佬解惑
我是想改一下a标签的链接的颜色,但是好像没有用。。。
HBX.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HBuilder X</title>
<link rel="icon" type="image/png" sizes="16x16" href="HBX.png">
<style type="text/css">
h1{
background-color: #F5F5DC;
color: #8FBC8F;
margin: 0;
padding: 5%;
}
p{
color: #F5F5DC;
background-color: #8FBC8F;
margin: 0;
}
a{
background-color: beige;
width: 100px;
margin: auto;
}
section{
color: #8FBC8F;
padding: 20px;
display: flex;
flex-direction: row;
}
::selection{
background-color: silver;
color: white;
}
div:hover{
background-color: burlywood;
color: #F5F5DC;
}
/*问题代码*/
a:link{
color: darkgoldenrod;
}
</style>
</head>
<body>
<h1>Hbuilder X</h1>
<p class="show">thank you for useing <dfn>HBuilder X</dfn></p>
<p class="show">感谢您使用<dfn>HBuilder X</dfn></p>
<section class="section1">
<a href="1.html"><div>first</div></a>
<a href="1.html"><div>second</div></a>
<a href="1.html"><div>third</div></a>
</section>
<section class="section2">
<a href="1.html"><div>one</div></a>
<a href="1.html"><div>one</div></a>
<a href="1.html"><div>one</div></a>
</section>
</body>
</html>
1.html<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HBuilder X</title>
<link rel="icon" type="image/png" sizes="16x16" href="HBX.png">
</head>
<body>
<p>开学啦</p>
</body>
</html>
|