我花了一整天而且不能改变丰富:面板风格类。这是页面:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<title>Test</title>
<style type="text/css">
.rich-panel{
border: 0px;
background: blue;
}
.rich-panel-body {
border: 0px;
background-color: blue;
color: orange;
font-size: 32px;
}
</style>
</h:head>
<h:body>
<rich:panel>
<p>Hello world!</p>
</rich:panel>
</h:body>
</html>
结果与不添加样式类相同。
答案 0 :(得分:0)
您插入此CSS
<style type="text/css">
div.rich-panel{
border: 0px;
background: blue;
}
div.rich-panel-body {
border: 0px;
background-color: blue;
color: orange;
font-size: 32px;
}
</style>
答案 1 :(得分:0)
富面板具有Style,Styleclass附加css属性
<rich:panel styleClass="somecssclass">
<p>Hello world!</p>
</rich:panel>
or
<rich:panel style="border:0px;color:orange">
<p>Hello world!</p>
</rich:panel>
答案 2 :(得分:0)
要更改Richfaces 4.x的rich:面板的样式类,我们必须使用rf-p,.rf-p-hdr和.rf-p-b类。例如:
div.rf-p{
border: 5px;
background: blue;
}
div.rf-p-b {
border: 0px;
background-color: blue;
color: orange;
font-size: 32px;
}
答案 3 :(得分:0)
执行此操作:
<rich:panel headerClass="panelHeader"
bodyClass="panelBody" >
<f:facet name="header">This is the Header Label</f:facet>
</rich:panel>
你的CSS应该是这样的:
.panelHeader {
background-image: url();
background-color: #87d6ed;
height: 12px;
text-align: center;
vertical-align: middle;
}
.panelBody {
background-color: #bdf0f0;
height: 8px;
width: 130px;
overflow: auto;
}