简体   繁体   中英

I am using ngx-qrcode to generate a qr code in my angular application. But it is quite small, and I'm unable to increase the width

This is the html and css for the qrcode.Is there any other way I can add width?

<div  nz-col *ngIf=showQRCode nzSpan="12" class="background">
   <ngx-qrcode
   [qrc-element-type]="'img'"
   [errorCorrectionLevel]="correctionLevel"
   [value]="value"
   qrc-class = "bshadow"></ngx-qrcode>
</div>

.bshadow{
   display: flex;
   align-items: center;
   justify-content: center;
   filter: drop-shadow(5px 5px 5px #222222);
   opacity: .5;
   width:200px;
 
 }

did you tried by cssClass ?

like this

<div  nz-col *ngIf=showQRCode nzSpan="12" class="background">
   <ngx-qrcode
   [qrc-element-type]="'img'"
   [errorCorrectionLevel]="correctionLevel"
   [value]="value"
   cssClass="bshadow"></ngx-qrcode>
</div>

[width]=500 in the HTML worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM