我无法更改商品的设计

时间:2019-11-28 23:01:03

标签: html css angular typescript

我正在使用ngx-dropzone库,但是拖动文件时它们会变得很大。为了解决这个问题,我尝试使用CSS更改大小,但无济于事。

有人可以帮助我吗?我希望高度和宽度大约为20px

HTML

<ngx-dropzone-label>
    <div>
        <h2>My custom dropzone</h2>
    </div>
</ngx-dropzone-label>
<ngx-dropzone-image-preview ngProjectAs="ngx-dropzone-preview" *ngFor="let f of files" [file]="f" [removable]="true" (removed)="onRemove(f)">
    <ngx-dropzone-label>{{ f.name }} ({{ f.type }})</ngx-dropzone-label>
</ngx-dropzone-image-preview>

CSS

.custom-dropzone {
    height: 250px;
    background: #333;
    color: #fff;
    border: 5px dashed rgb(235, 79, 79);
    border-radius: 5px;
    font-size: 20px;
}

2 个答案:

答案 0 :(得分:2)

您可以像下面那样定位ngx-dropzone-preview

ngx-dropzone-preview{
    height: 40px !important;
    min-height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
}

答案 1 :(得分:0)

我设法使用这种样式设置图像的宽度:

public static Stream Decrypt(FileStream data, string key, string iv)
{
    Aes aes = Aes.Create();

    aes.KeySize = 256;
    aes.BlockSize = 128;
    aes.Padding = PaddingMode.Zeros;

    aes.Key = Encoding.ASCII.GetBytes(key);
    aes.IV = Encoding.ASCII.GetBytes(iv);

    return new CryptoStream(data, aes.CreateDecryptor(aes.Key, aes.IV), CryptoStreamMode.Read);
}