添加自动高度,优化界面
This commit is contained in:
+11
-6
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user