2011-11-02 5 views
0

PrimeFaces 1.1을 JSF 1.2와 함께 사용합니다. 검은 테두리가 파란색 인 PrimeFaces <p:lightBox> 오버레이의 스타일을 변경해야하지만 구성 요소의 style 속성은 오버레이를 변경하지 않고 라이트 박스가 호출 된 링크 만 변경합니다.LightBox의 스타일 테두리 변경

<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> 

답변

0

내가 잘못 입력하지 않으면 <a> 태그가 생성됩니다. Lightbox의 <div>에 속성을 추가 할 수 있는지 여부는 알 수 없습니다.

나는 당신의 HTML 코드를 생성하지 않습니다,하지만 당신은이 작업을 수행 할 수 있습니다

  1. 를 사용하여 Google 크롬 라이트 박스 검사 (오른쪽 라이트 박스를 클릭하고 요소 검사) <div>의 클래스를 볼 수 있습니다.
  2. <a>에 새로운 "온 클릭"속성을 추가하고 사용하는 자바 스크립트 요소의 스타일을 다시 ...

하지만 당신은 jar 파일에서 primefaces의 CSS를 수정해야 ... 나는 자바 스크립트 방법은 우아한 찾을 수 없습니다. ..

+0

재생을위한 알렉스,이 링크는 생성 된 HTML 코드를 찾을 수있는 링크입니다. http://www.primefaces.org/showcase/ui/lightBoxExternal.jsf –

+0

나는 CSS 파일을 수정합니다. primefaces jar에 포함되어 있지만 프로젝트에 새 jar를 포함하면 primefaces API가 작동하지 않습니다. –

+0

@ANIS BOULILA hei .. 이렇게하지 마세요. 새 CSS를 만들고 i 귀하의 페이지 (링크가있는 곳)에서 nclude ... primeface의 CSS 속성은 CSS 파일에 의해 덮어 써야합니다 – Alex