所以我看到这些帖子1和这一个悬停在div上改变另一个div 2
你把鼠标悬停在某个图像上,它会显示文本
我试着用文字来做,效果很好。现在我试着把它放在div里,结果它停止工作了
我想要的是当我悬停在右边的html上时,htmldes dic会显示在左边。what i wantwhat i get
.skill{
display: flex;
justify-content: center;
align-items: center;
}
.skilldes{
background-color: blue;
width: 50%;
height: 300px;
}
/* skilldescriptioncontainer */
.sdc{
display: flex;
flex-direction: column;
width: 50%;
background-color: rgb(255, 0, 0);
position: absolute;
}
.skilltxt{
background-color: rgb(163, 9, 9);
width: 50%;
height: auto;
}
.skillsub{
display: flex;
justify-content: center;
align-items: center;
}
.skillsubcon{
margin: 10px;
}
.htmldes{
display:none;
background-color: aqua;
}
.skill .skilltxt .skillsub .html:hover + .skill .skillimg .htmldes{
display:block;
}
个字符
我已经做了4个多小时了。寻求帮助和搜索,并尝试了所有的方法,我发现可以工作,但没有一个是有效的。请帮帮忙
2条答案
按热度按时间9udxz4iz1#
这可以使用
:has()
pseudo-class来完成字符串
的数据
3qpi33ja2#
尝试使用JavaScript事件侦听器
mouseover
和mouseout
:个字符