gpt4 book ai didi

jsf - 如何编辑 CSS?

转载 作者:行者123 更新时间:2023-12-01 22:09:01 24 4
gpt4 key购买 nike

我试图仅显示按钮add和按钮下方上传的图片,但我在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>

这就是生成方式:

form

我想要一些更简单的东西,因为在另一个时刻我会一些 jQuery slider 插件。但我不能用 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..文件按钮看起来像:

enter image description here

这些帖子也非常有用:

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。

例如,如果您使用important,请将 CSS 应用为:

div div.rf-fu-lst { display:none } 它会为你工作。

关于jsf - 如何编辑<rich :fileUpload> CSS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16050890/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com