使qr代码全宽

时间:2015-12-31 12:00:41

标签: javascript html css

我使用this库制作二维码。

我试图让qrcode的宽度为100%。我尝试过使用Base pointer Stack pointer,就像我在图片上一样,但它没有用。

codepen Reference Here

有什么想法吗?

2 个答案:

答案 0 :(得分:3)

嗨参考为图片添加css:

#qrcode img{
 width: 100%;
}

答案 1 :(得分:1)

在您的codepen上,它在图像上的宽度为100%

if (localStorage["note"])
{
    var user = localStorage["note"] ;
    document.getElementById("note").value = user ;
}
else
{
    document.getElementById("note").placeholder = "notes" ;
    console.log("notes not found in localStorage")
}

document.getElementById("save").addEventListener("click", function ()
{
    var user = document.getElementById("note").value ;
    localStorage.setItem("note", note) ;
    alert("note id saved") ;
} , false);

function closeIt(that) {
    var cls = parseInt(that.parent().parent().attr('class').split(' ')[1]);
    var index = arr.indexOf(cls);
    console.log('.note.'+cls+' '+index);
    arr.splice(index,1);
    that.parent().parent().remove();
}
相关问题