-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Custom CSS for scan box #449
Comments
@jahnavi310 take a look at the issue #429. It may help you. |
You can remove them and add your own element with custom class into the scan box element. qrScanner.start(......).then(() => {
let overlayElement = document.getElementById('qr-shaded-region');
let childElements = overlayElement.querySelectorAll('div');
// Remove corners
for (let childElement of childElements) {
childElement.remove();
}
// Create own corner elements
let leftTopElement = document.createElement('div');
let leftBottomElement = document.createElement('div');
let rightTopElement = document.createElement('div');
let rightBottomElement = document.createElement('div');
leftTopElement.classList.add('custom-corners-css');
leftBottomElement.classList.add('custom-corners-css');
rightTopElement.classList.add('custom-corners-css');
rightBottomElement.classList.add('custom-corners-css');
overlayElement.appendChild(leftTopElement);
overlayElement.appendChild(leftBottomElement);
overlayElement.appendChild(rightTopElement);
overlayElement.appendChild(rightBottomElement);
}); |
Marking this as a duplicate of #389 Let's have more discussion there. |
Anyone got an idea how to do this? I cant shape the shade region |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I am using the pro mode to get a custom overlay for the qr code scanner. I am running into issues on trying to override the CSS for the scan box.
I am for some reason not able to style the qr-shaded-region div, is there a way i can override the CSS for the scan box with something custom?
Thanks in advance
The text was updated successfully, but these errors were encountered: