如何在悬停时显示Richfaces commandButton

时间:2013-03-27 10:22:57

标签: hover richfaces visibility commandbutton

当我悬停外部div时,是否有一种简单的方法来显示commandButton?

<h:panelGroup layout="block" styleClass="galleryPreview">
      <a4j:commandButton value="Start from here" styleClass="commandButton"
      action="#{skinningBean.setCurrentSkinAndForwardToEditor(skin, false)}" />
</h:panelGroup>

所以我想我必须先隐藏我的按钮,例如visibility: hidden;

是否可以在悬停时将div中的所有元素设置为可见?

这样的东西
.galleryPreview:hover {
    border: 1.5px solid #6bba29;
    visibility: visible;
}

1 个答案:

答案 0 :(得分:2)

我只需要将commandButton的类设置为visible,而不是外部div

.galleryPreview:hover .commandButton{
    visibility: visible;
}