hover伪类
作用:鼠标移入触发指定的样式鼠标移出回到初始样式整个css样式都不会被加载
:前是hover固定的写法触发者
:后是添加hover伪类的目标指定目标最好是单一的
hover后是显示者伪类的属性至少写三个以上
<style>
.box{
width: 100px;
height: 100px;
background-color: red;
transition: all 2s;
}
.box:hover{
width: 100px;
height: 100px;
border-radius: 50%;
/* 鼠标移入切园 */
background-color: yellow;
/* 鼠标移入颜色变黄 */
}
</style>
<body>
<div class="box"></div>
</body>