From 250990c307fff8393495abaa6123f43432d4f946 Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期一, 15 三月 2021 15:44:07 +0800
Subject: [PATCH] 搜索面板加标题
---
public/index.html | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/public/index.html b/public/index.html
index 4123528..396d79c 100644
--- a/public/index.html
+++ b/public/index.html
@@ -3,7 +3,9 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
+<!-- <meta name="viewport" content="width=device-width,initial-scale=1.0">-->
+ <meta name="viewport" content="width=device-width">
+ <meta http-equiv="X-UA-Compatible" content="IE=11">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
@@ -13,5 +15,19 @@
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
+ <script type="text/javascript">
+ /* 杩欓噷鎴戜滑鍒╃敤浜嗕竴涓嚜鎵ц鍑芥暟 */
+ (function(){
+ change();
+ function change(){
+ console.log( document.documentElement.clientWidth*12/640 +'px')
+ //html鐨� font-size 鐨勫ぇ灏忓昂瀵�
+ //杩欓噷鐨刪tml瀛椾綋澶у皬鍒╃敤浜嗕竴涓畝鍗曠殑鏁板鍏紡锛屽綋鎴戜滑榛樿璁剧疆浠ュ睆骞�320px浣嶅熀鍑嗘鏃剁殑瀛椾綋澶у皬涓�20px(320 20px),閭d箞娴忚鍣ㄧ獥鍙eぇ灏忔敼鍙樼殑鏃跺�欐柊鐨刪tml鐨刦ontSize锛坈lientWidth 鏂扮殑鍊硷級灏辨槸clientWidth*20/320
+ document.documentElement.style.fontSize = document.documentElement.clientWidth/12 +'px';
+ }
+ /* 鐩戝惉绐楀彛澶у皬鍙戠敓鏀瑰彉鏃�*/
+ window.addEventListener('resize',change,false);
+ })();
+ </script>
</body>
</html>
--
Gitblit v1.8.0