修复手机只显示60%问题以及最小高度æ˜充满屏幕

This commit is contained in:
luchenqun 2018-10-12 14:17:44 +08:00
parent b20d8cfac6
commit 4ffc48e4d7
1 changed files with 4 additions and 2 deletions

View File

@ -1442,12 +1442,14 @@ api.get('/notes', function(req, res) {
<script> <script>
if(screen && screen.availWidth <= 1024) { if(screen && screen.availWidth <= 1024) {
setTimeout(() => { setTimeout(() => {
document.getElementById("note").style.width = "100%"; document.getElementById("note-div").style.width = "100%";
document.getElementById("note-div").style["background-color"] = "#F3F4F5";
document.getElementById("note").style.width = "95%";
}, 100); }, 100);
} }
</script> </script>
</head> </head>
<div style="text-align:center;"> <div id="note-div" style="text-align:center;">
<pre id="note" style="background-color:RGB(243,244,245); padding:0px 10px 0px 10px; margin:0px; width:60%; min-height:100%;display: inline-block;text-align: left; font-size: 15px; font-family:italic arial,sans-serif;word-wrap: break-word;white-space: pre-wrap;">\n\n${data}</pre> <pre id="note" style="background-color:RGB(243,244,245); padding:0px 10px 0px 10px; margin:0px; width:60%; min-height:100%;display: inline-block;text-align: left; font-size: 15px; font-family:italic arial,sans-serif;word-wrap: break-word;white-space: pre-wrap;">\n\n${data}</pre>
</div> </div>
</body>`)) </body>`))