CSS 의사 선택기 대상 의사 클래스

CSS 의사 선택기 대상 의사 클래스

<style>
	div{
      
      
		background-color:gray;
		height:300px;
	}
	div:target{
      
      
		background-color:green;
	}
</style>
<a href="#one">第一个</a>
<a href="#two">第二个</a>
<a href="#three">第三个</a>

<div id="one">第一个</div>
<div id="two">第二个</div>
<div id="three">第三个</div>

Supongo que te gusta

Origin blog.csdn.net/m0_48546501/article/details/130764545
Recomendado
Clasificación