From ef52c48b266fa9bf427201db136844c34a589e2a Mon Sep 17 00:00:00 2001 From: Van Date: Sun, 23 Jun 2019 14:45:20 +0800 Subject: [PATCH] fix #367 --- static/css/playground.css | 14 +++++++++++--- static/js/playground.js | 1 - views/playground/index.html | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/static/css/playground.css b/static/css/playground.css index 8bbbfcb..6d37163 100644 --- a/static/css/playground.css +++ b/static/css/playground.css @@ -14,8 +14,16 @@ * limitations under the License. */ -body{ - overflow: auto; +body { + display: flex; + flex-direction: column; + max-height: 100vh; +} + +.main { + flex: 1; + min-height: 1px; + display: flex; } .header { @@ -61,7 +69,7 @@ body{ } .share-panel .font-ico:hover { - transform:rotate(360deg); + transform: rotate(360deg); } .footer { diff --git a/static/js/playground.js b/static/js/playground.js index f9ab49e..458478d 100644 --- a/static/js/playground.js +++ b/static/js/playground.js @@ -26,7 +26,6 @@ var playground = { editor: undefined, pid: undefined, _resize: function () { - $('#goNews, #editorDivWrap').height($(window).height() - 40 - $(".footer").height()); playground.editor.setSize("auto", ($("#editorDiv").parent().height() * 0.7) + "px"); }, _initShare: function () { diff --git a/views/playground/index.html b/views/playground/index.html index 4efdd22..beded38 100644 --- a/views/playground/index.html +++ b/views/playground/index.html @@ -62,8 +62,8 @@ -
-
+
+
@@ -71,7 +71,7 @@
-
+