添加自动高度,优化界面

This commit is contained in:
2024-07-14 14:13:38 +08:00
parent 41b6eb97da
commit 06aed90afd
2 changed files with 13 additions and 7 deletions
+11 -6
View File
@@ -5,19 +5,24 @@
<meta charset="UTF-8" />
<title>Terminal</title>
<style>
.full-screen-iframe {
width: 100%;
height: 100%;
border: none;
}
body {
background-color: black;
}
</style>
<script>
function changeFrameHeight() {
var iframe = document.getElementById("iframe");
iframe.height = document.documentElement.clientHeight;
}
window.onresize = function () {
changeFrameHeight();
}
</script>
</head>
<body>
<iframe src="./terminal.php" class="full-screen-iframe"></iframe>
<iframe src="./terminal.php" class="full-screen-iframe" onload="changeFrameHeight()" height="" width="100%" scrolling="auto" frameborder="0" id="iframe"></iframe>
</body>
</html>
+2 -1
View File
@@ -2,6 +2,7 @@
<html>
<head>
<link rel="preload" href="style.css" as="style" />
<meta charset="UTF-8" />
<!-- <meta http-equiv="refresh" content="2"> -->
<title>frame</title>
@@ -10,7 +11,7 @@
<body>
<?php
$output_str = "Welcome to the terminal!<br/>Type 'help' to see a list of commands.<br/>";
$output_str = "Welcome to the terminal!<br/>Type 'help' to see a list of commands.<br/><br/><br/><br/><br/><br/>1";
echo $output_str;
?>
</body>