# HG changeset patch # User nanaya # Date 1476518399 -32400 # Node ID 30cd1768611bf9f997e8f1b26901699bacc62773 # Parent 6b5cab0b3f914526ee9b884ac4d67a4ecf24d5d7 Hide when box is empty diff -r 6b5cab0b3f91 -r 30cd1768611b index.html --- a/index.html Sat Oct 15 16:38:11 2016 +0900 +++ b/index.html Sat Oct 15 16:59:59 2016 +0900 @@ -45,6 +45,14 @@ flex: 1; } + .outputbox { + will-change: opacity; + } + + .outputbox.js-hidden { + opacity: 0; + } + .title { font-size: 16px; } @@ -61,7 +69,7 @@ -
+
@@ -83,6 +91,9 @@ if (text !== "") { qr.makeCode(text); + outputDom.classList.remove('js-hidden'); + } else { + outputDom.classList.add('js-hidden'); } });