css - 更改 LightBox Primefaces 的样式边框

标签 css jsf primefaces

我将 PrimeFaces 1.1 与 JSF 1.2 结合使用。 我需要更改 PrimeFaces 的样式 <p:lightBox>具有蓝色黑色边框的叠加层,但 style组件的属性不会更改叠加层,只会更改调用灯箱的链接。

<p:lightBox width="50%" height="25%" 
    style="border: 5px; border-style: solid; border-color: blue;">
    <h:outputLink value="#" title="Leo Messi" >
        <h:outputText value="The Messiah"/>
    </h:outputLink>

    <f:facet name="inline">
        <h:panelGrid columns="2">
            <p:graphicImage value="/images/barca/messi.jpg" />
            <h:outputText style="color:#FFFFFF"
                value="Messi is an unusual player. He is highly creative, and has the skills to take on defenders with ease. He is a versatile left-footed player who can play either in the middle or on either wing, or even as a centre forward.
                Although he is quite short, he is so fast and physically strong that he can cope with larger opponents. He is incredibly powerful, and a specialist in such dead ball situations as corners, free kicks and penalties.
                Leo Messi is cool-headed and able to assume several responsibilities in times of need. He is a player who is destined to have a very successful career in football."></h:outputText>
        </h:panelGrid>
    </f:facet>
</p:lightBox>

最佳答案

如果我没记错那就是<a>标签生成。我不知道你是否可以为 lightbox 的 <div> 添加任何属性.

我没有生成你的 HTML 代码,但你可以这样做:

  1. 使用谷歌浏览器检查灯箱(右键单击灯箱并检查元素)以查看 <div>的类(class)。
  2. <a> 添加一个新的“onclick”属性并使用 javascript 重新设计元素的样式...

但是你应该从 jar 文件中修改 primefaces 的 css...我不觉得 javascript 方法很优雅...

关于css - 更改 LightBox Primefaces 的样式边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7977715/

相关文章:

html - 如何在新选项卡中打开页面但不为其提供焦点?(JSF 2.0)

css - 高清显示器标准

javascript - 如何在 JsPlumb 中建立与边缘的连接?

html - 按钮在 Internet Explorer 7 中呈现不正确 - 需要 IE7 特定的 CSS 修复

jsf - 如何制作 p :graphicImage clickable and invoke bean action

java - 在 primefaces 中单击 ESCAPE(ESC) 时关闭所有对话框

css - 仅在需要时加载 React block CSS

javascript - 加载数据表后触发 JavaScript 操作

html - 如何编写更具体的 css

java - 使用 getPhysicalNumberOfCells 方法将 css 应用于 POI 生成的单元格?