what do you mean by div:target+a in the following code style? I understand the "+" sign. I don"t understand why div:target? Shouldn"t target be preceded by the url address of the a tag?
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
a{
float: left;
width: 120px;
height:50px;
line-height: 50px;
text-align: center;
text-decoration: none;
background: -sharp000;
color: -sharpfff;
border:2px solid -sharpfff;
}
div{
position: absolute;
top:80px;
width: 300px;
height:300px;
background: yellow;
display: none;
}
-sharpbox1:target{
display: block;
}
-sharpbox2:target{
display: block;
}
-sharpbox3:target{
display: block;
}
div:target+a{
background: red;
}
</style>
</head>
<body>
<div id="box1"></div>
<a href="-sharpbox1"></a>
<div id="box2"></div>
<a href="-sharpbox2"></a>
<div id="box3"></div>
<a href="-sharpbox3"></a>
<!--
:target
url
-->
</body>
</html>