hover时显示,其余时间隐藏

//对应组件上写father/child
.father .child {
    
    
  display: none; //p的内容一开始设置为不可见
}

.father:hover .child {
    
    
  display: block; //鼠标移入后,p的标签的内容为可见
}

猜你喜欢

转载自blog.csdn.net/Ybittersweet/article/details/129883816