The mouse of Yunfeng butterfly shows how the QR code is realized.

Yunfeng butterfly https://www.yunfengdie.com/ case presentation

Mouse over to show how the QR code is implemented

Please take the stage to perform

Thank you

Apr.07,2021

there are many such interactions.

similar to the case, hover shows the opacity of the originally hidden child element qrcode-div from 0 to 1.
it is suggested that the landlord can directly open the console to see how other people do it, ha, and track the style of the relevant elements.

other ways that can be achieved:

1. Div of the default rendered QR code

  1. style opacity:1 of the default style opacity:0,hover
  2. style display: block of the default style display:none,hover

2. The content of the div of the box, which displays the original content by default (case picture + replace the content of div with the template of QR code when describing), hover (but this way will modify the dom node repeatedly)


are you asking how to generate the QR code?
Baidu qrcode.js
https://github.com/davidshimj.

var qrcode = new QRCode("test", {
    text: "http://www.runoob.com",
    width: 128,
    height: 128,
    colorDark : "-sharp000000",
    colorLight : "-sharpffffff",
    correctLevel : QRCode.CorrectLevel.H
});
Menu