侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

jsf – 如何编辑CSS?

2022-12-24 星期六 / 0 评论 / 0 点赞 / 28 阅读 / 2724 字

我试图只显示按钮添加和按钮下方的上传图片,但无论我在CSS中做什么,richfaces生成的表始终是相同的: 这是我使用richfaces的表单: <ui:define name="con

... . . 我试图只显示按钮添加和按钮下方的上传图片,但无论我在CSS中做什么,richfaces生成的表始终是相同的:

这是我使用richfaces的表单:

<ui:define name="content">        <h:form>            <h:panelGrid>                <rich:fileUpload fileUploadListener="#{fileUploadBean.listener}" id="upload" acceptedTypes="jpg,gif,png,bmp"  ontyperejected="alert('Just JPG,GIF,PNG and BMP are allowed');" maxFilesQuantity="12" immediateUpload="true" >                    <a4j:ajax event="uploadcomplete" execute="@none" render="info" />                </rich:fileUpload>                <h:panelGroup id="info">                    <h:outputText value="Add picture" rendered="#{fileUploadBean.size==0}" />                    <rich:dataGrid columns="4" value="#{fileUploadBean.files}" var="file" rowKeyVar="row">                        <a4j:mediaOutput element="img" mimeType="image/jpeg" createContent="#{fileUploadBean.paint}" value="#{row}" style="width:100px; height:100px;" cacheable="false" />                    </rich:dataGrid>                    <br />                    <a4j:commandButton action="#{fileUploadBean.clearUploadData}" render="info,upload" value="Clear Uploaded Data" rendered="#{fileUploadBean.size>0}" />                </h:panelGroup>            </h:panelGrid>        </h:form>    </ui:define>

这是如何生成的:

我想要更简单的东西’因为在另一个时刻我将使用一些jQuery滑块插件.但我不能用richfaces生成的这个表消失.
是的皮肤是disable in my richfaces configuration:

更新
根据建议我的CSS现在看起来像这样:

<style>    div div.rf-fu { border: 0px; width: 85px; }    div div.rf-fu-hdr { border: 0px; }    span span.rf-fu-btn-clr { border: 0px; }    span.rf-fu-btns-lft{ width: 85px; }    span.rf-fu-btns-rgh{ display: none; }    div div.rf-fu-lst { display:none; }    </style>

现在我的add ..文件按钮看起来像:

这些帖子也很有用:

Should I use ‘border: none’ or ‘border: 0’?
Inner div has borders – how to override with a class on an outer div?

.

解决方法

. 您可以使用Adrian的答案来覆盖richfaces css,但是您不需要使用!important来覆盖richfaces css.只需使用 selector specificity来覆盖richfaces应用的css.

对于使用重要的实例,请将css应用为:

div div.rf-fu-lst {display:none}它会对你有用.

. . .. ...

广告 广告

评论区