Browse Source

增加ie9及以下升级浏览器提示

hangb 7 years ago
parent
commit
aaaa0d53be
2 changed files with 56 additions and 0 deletions
  1. 14 0
      app.html
  2. 42 0
      assets/scss/common.scss

+ 14 - 0
app.html

@@ -51,6 +51,20 @@
   </script>
 </head>
 <body {{ BODY_ATTRS }}>
+  <div id="result" class="com-result">
+      <span class="text">
+        <em>*</em>您的浏览器版本过低,部分功能可能无法正常使用,请下载IE10及以上版本</span>
+    <a class="close-tip" onclick="resultClose()">&times;</a>
+  </div>
 {{ APP }}
 </body>
+<script>
+  if(navigator.appName == "Microsoft Internet Explorer"&&parseInt(navigator.appVersion.split(";")[1].replace(/[ ]/g, "").replace("MSIE",""))<10){
+    var el = document.getElementById('result')
+    function resultClose () {
+      el.setAttribute('style', 'display:none;')
+    }
+    el.setAttribute('style', 'display:block;')
+  }
+</script>
 </html>

+ 42 - 0
assets/scss/common.scss

@@ -829,3 +829,45 @@ form .questions .el-form-item__content span.question {
   position: relative;
   z-index: 10;
 }
+
+
+
+//ie9及以下提示框
+
+.com-result{
+  display: none;
+  position: relative;
+  height: 30px;
+  width: 100%;
+  line-height: 30px;
+  text-align: center;
+  background: #fef6f2;
+  border: 1px solid #ec854d;
+  overflow: hidden ;
+}
+.com-result .text{
+  width: 100%;
+  text-align: center;
+  font-size: 14px;
+  color: #f15601;
+}
+.com-result .text em{
+  margin-right: 3px;
+  font-style: normal;
+}
+.com-result .text a {
+  color: #5078cb;
+}
+.com-result .close-tip{
+  position: absolute;
+  right: 0;
+  padding-right: 10px;
+  font-size: 20px;
+  font-weight: bold;
+  color: #ef1d1d;
+  line-height: 28px;
+}
+
+.clear-float {
+  clear: both;
+}