【问题标题】:FIlepond Image preview background colorFIlepond 图像预览背景颜色
【发布时间】:2021-06-26 17:22:26
【问题描述】:

有没有办法改变在 Filepond 中显示初始图像文件时使用的默认背景颜色?目前,图像已调整大小以适应控件,并使用黑色使用额外的背景空间。我可以让标准文件类型以不同的背景颜色显示,但不能以图像显示。

我尝试修改 css 但没有任何运气。

【问题讨论】:

    标签: filepond


    【解决方案1】:

    您需要为类名为filepond--image-previewdiv 设置背景颜色。

    .filepond--image-preview {
        background: red;
    }
    

    请注意,要覆盖原始选择器,您必须在加载图像预览样式后加载此选择器,或者使选择器更具体:

    .filepond--root .filepond--image-preview {
        background: red;
    }
    

    【讨论】:

      【解决方案2】:

      文档中有关于如何覆盖样式的说明:https://pqina.nl/filepond/docs/api/style/#fonts-and-colors

      这是您可能正在寻找的 css:

      [data-filepond-item-state='processing-complete'] .filepond--item-panel {
          background-color: red;
      }
      

      【讨论】:

        猜你喜欢
        • 2012-01-01
        • 2019-07-20
        • 2011-07-22
        • 1970-01-01
        • 2011-11-23
        • 2014-04-26
        • 2012-03-15
        • 1970-01-01
        相关资源
        最近更新 更多