When using the IE8 browser to generate a QR code, the size of the QR code is distorted
asonglife opened this issue · 0 comments
When using the IE8 browser to generate the QR code, the form of the table tag is used.
There is a problem here: to calculate the height of each cell, use the Math.floor() method. When there is a lot of content, because of the downward rounding, the actual generated QR code size will be much smaller than the actual displayed one. As a guess, the more content, the more severe the size distortion.
It is recommended to use the style attribute when generating the table tag to fix the width and height instead of using the sum of the width and height calculated by the cell as the final width and height of the QR code.
aHTML.push('</table style=“width:100%;height:100%">');
We can set the size of table`s parent node directly and Using margin to make size will cause some strange scenes