当前位置: 首页 > news >正文

网站备案拍照是什么百度知道客服电话人工服务

网站备案拍照是什么,百度知道客服电话人工服务,国外网站欣赏,注册网站的流程引言 现在我们用的一些主流前端框架,如vue, angular, react等对低版本的ie浏览器支持不好,一般指的是ie9以下的。如果低版本ie浏览器,打开我们的网站页面时, 我们希望给用户温馨的提示,去升级浏览器&#…

引言

现在我们用的一些主流前端框架,如vue, angular, react等对低版本的ie浏览器支持不好,一般指的是ie9以下的。如果低版本ie浏览器,打开我们的网站页面时, 我们希望给用户温馨的提示,去升级浏览器,而不是页面混乱,各种报错。

更新页面效果:
这里写图片描述
更新页面demo


怎么做

为了实现以上需求,我们分两步来完成。
(1) 用 js 检查当前浏览器版本,如果是ie9以下,跳转去更新页面。
这段js一般放在,项目的首页的head中。

/* 检查ie浏览器版本 */
(function() {var o = navigator.userAgent.match(/MSIE (\d+)/);o = o && o[1];console.log('o', o);// ie9 以下 || o != nullif (!!o && o < 9) {// 更新页面var newUrl = location.protocol + '//' + location.host + '/views/static/ieupdate/index.html';location.href =  newUrl;}
})();

(2) 更新页面的实现
源码如下, 其中四张浏览器图标可以从在线demo中下载。

<html><head><title>请升级您的浏览器</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><!-- IE8/9及以后的版本用最新的引擎渲染网页 --><meta content="IE=edge" http-equiv="X-UA-Compatible"><style>body{font-size: 13px;font-family: Georgia,Verdana,sans-serif;color: #333;padding:  0;margin: 0;}.wrap{min-width: 1024px;margin: 47px 20px;background-color: #fff4f4;border: solid 1px #777;box-shadow: 0 0 8px #888;position: relative;}.wrap .title{text-align: center;margin: 13px 25px;font-weight: bold;font-size: 19px;}.wrap .list{width: 100%;margin-bottom: 10px;}.wrap .list .item{text-align: center;padding: 10px;width: 25%;}.wrap .list .item:hover .link{border: dashed 1px rgb(170, 170, 170);padding-top: 109px;padding-bottom: 3px;}.wrap .list .item .link{padding-top: 110px;padding-bottom: 4px;background-position: center top;background-repeat: no-repeat;display: block;text-decoration: none;}.wrap .list .item .bf{background-image: url('ff.png');}.wrap .list .item .bo{background-image: url('op.png');}.wrap .list .item .bc{background-image: url('ch.png');}.wrap .list .item .bi{background-image: url('ie.png');}.wrap .list .item .link .name{color: #e25600;text-align: center;text-decoration: underline;font-size: 19px;font-family: 'Open Sans',sans-serif;font-weight: 300;}.wrap .list .item .link .vendor{font-size: 10px;color: #aaa;text-align: center;display: block;margin-top: 5px;text-decoration: none;}.wrap .tag {text-align: center;margin: 13px 25px;font-size: 19px;font-family: 'Open Sans',sans-serif;font-weight: 300;}</style></head><body><div class="wrap"><p class="title">您的浏览器需要更新,请下载一款免费而优秀的最新版浏览器。</p><!-- 用table,为了兼容 ie5 --><table class="list"><tr><td class="item"><a class="link bf" href="http://www.mozilla.com/firefox/" target="_blank"><span class="name">Firefox</span><span class="vendor">Mozilla Foundation</span></a></td><td class="item"><a class="link bo" href="http://www.opera.com/zh-cn" target="_blank"><span class="name">Opera</span><span class="vendor">Opera Software</span></a></td><td class="item"><a class="link bc" href="http://www.google.cn/chrome/browser/desktop/index.html" target="_blank"><span class="name">Chrome</span><span class="vendor">Google</span></a></td><td class="item"><a class="link bi" href="http://windows.microsoft.com/en-HK/internet-explorer/download-ie" target="_blank"><span class="name">Internet Explorer Edge</span><span class="vendor">Microsoft</span></a></td></tr></table><p class="tag">带来更多安全、极速和乐趣。</p></div></body>
</html>

结束语

看起来很简单, 实际做了一遍,发现还是有一些需要注意的地方。如下:
1. 判断ie浏览器版本,用的是正则 /MSIE (\d+)/, 但是ie10 以上是匹配不到的, 所以要加入 !!o.
2. 浏览器更新页面, 要兼容低版本ie浏览器, 所以用table布局, 不要用较新的css,或者css3等。
3. 来测试你的ie浏览器吧: 在线demo

http://www.hengruixuexiao.com/news/32650.html

相关文章:

  • 站点创建成功微信引流的十个方法
  • 网站个人备案转企业备案百度热线
  • 做网站 服务器多少钱一年今日新闻最新消息50字
  • 分析网站日志文件成都企业seo
  • 广东官方移动网站建设哪家好网站搭建步骤
  • 二次开发比一次开发难吗东莞seo外包平台
  • 昆明网络营销网站收录优美图片崩了
  • 长治网站运营在线识别图片百度识图
  • 成都企业网站制作网站怎么优化推荐
  • 网站导航营销的优点seo新闻
  • 东莞外贸网站qq群推广网站免费
  • 网站建设技术团队有多重要营销技巧五步推销法
  • 网站测试毕设代做百度网址大全电脑版
  • 有哪些是做二手的网站百度一下你就知道下
  • 幼儿园建设报备网站seo整站优化一年价格多少
  • wordpress主机主题长沙搜索排名优化公司
  • 做网站后台怎么搭建博客程序seo
  • 黄色为主的网站广州网络科技有限公司
  • wordpress的dltable fileseo网站关键词排名快速
  • 做app需要什么技术班级优化大师学生版
  • 乐平市建设局网站双11销售数据
  • 网页设计作品及源码佛山seo关键词排名
  • 网站开发公司会计seo比较好的优化方法
  • 公司网站建设开源平台新闻头条今日要闻军事
  • 魔方网站建设网站制作seo哪家好
  • 做网站公司做网站公司有哪些外贸网络营销平台
  • 做网站建设的上市公司有哪些广州网站定制多少钱
  • 深圳网站制作公司机构品牌营销策划机构
  • 凡科快图官网制作泰安seo公司
  • 云服务器有哪些吉林seo管理平台