在悬停伪改变孩子

时间:2015-05-17 19:51:52

标签: css pseudo-class mousehover

我试图改变。更多关于hover .gfield_description:after 但是,这种方式可能是这样的吗?

<div class="gfield_description">
<div class="more"/>
</div>

.gfield_description:after {
content: "?";
}
.more {opacity:0;}
.gfield_description:hover:after .more {
opacity:1;
}

1 个答案:

答案 0 :(得分:1)

试试这个

.more {
    opacity: 0;
}
.gfield_description:hover > .more {
    opacity: 1;
}