Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cannot set a dynamic width and height with CSS #367

Open
COD3BREAK3R opened this issue Jul 21, 2024 · 1 comment
Open

I cannot set a dynamic width and height with CSS #367

COD3BREAK3R opened this issue Jul 21, 2024 · 1 comment

Comments

@COD3BREAK3R
Copy link

I would like to know how to remove the width and height that the library includes by default so that I can give it my own width and height using CSS styles

@Denis-Ivanov-G-2
Copy link

Denis-Ivanov-G-2 commented Jul 30, 2024

Hi, i used this method:

< img id="js-qr-code" src="" alt="qr-code" >

<script> const opts = { errorCorrectionLevel: 'H', type: 'image/jpeg', quality: 0.3, margin: 0.4, color: { dark: '#5061CE', light: '#FFFFFF' } } QRCode.toDataURL('test content', opts, function (err, url) { if (err) throw err document.querySelector('#js-qr-code').src = url }) </script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants