[英]CSS rollover effects with RichFaces a4j:commandButton
I've not seen a useful, authoritative web resource which says how to reliably enable rollover effects on a4j:commandButton
elements in RichFaces JSF content. 我还没有看到有用的权威性Web资源,该资源说明了如何在RichFaces JSF内容中的a4j:commandButton
元素上可靠地启用翻转效果。
I have found plenty of css resources re buttons, but then when they start talking about html I start wondering what the equivalent is in more recent web technologies. 我发现大量的CSS资源重新按钮,但是当他们开始谈论html时,我开始怀疑在最新的Web技术中,等效的是什么。
Basically I want my buttons to look different on hover and then on click. 基本上,我希望我的按钮在悬停然后在单击时看起来有所不同。 I'd like to use images but client side js is out of scope for this q. 我想使用图片,但是客户端js不在此范围之内。
m 米
Use the following attributes as in this example below to your a4j:commandButton
( have a look at the full list (v3.3.1.GA)): 在下面的示例中,对a4j:commandButton
使用以下属性(请查看完整列表 (v3.3.1.GA)):
<a4j:commandButton value="Submit" styleClass="ctlBtn"
id="myCtlBtn" type="submit" style="margin-bottom: 5px;"
reRender="allMyOtherplaces"
onmouseover="this.className='ctlBtn btnHover'"
onmousedown="this.className='ctlBtn btnDown'"
onmouseup="this.className='ctlBtn'"
onmouseout="this.className='ctlBtn'"
onclick="this.className='ctlBtn btnDown'"
oncomplete="this.className='ctlBtn'" />
And create classes ctlBtn
, btnHover
and btnDown
in your included .css file. 并在包含的.css文件中创建类ctlBtn
, btnHover
和btnDown
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.