设置浏览器版本不兼容提示

在public中的index.html文件中设置
如图:
在这里插入图片描述
设置代码:

<!--[if lte IE 9]>您的浏览器版本过低 请下载最新的谷歌浏览器<![endif]-->

显示内容居中样式代码:
下载最新谷歌浏览器链接:

<!--[if lte IE 9]> 
    <div style='position:absolute; top: 50%; left:50%; margin-top: -50px;margin-left: -400px; align-items: center;justify-content: center;'>
      <div style='width: 800px; height: 100px;text-align: center'>
        <h1>
        您的浏览器版本过低 请下载最新的谷歌浏览器
      </h1>
      <div style='text-align: center;width: 800px'>
        <a href='https://www.google.cn/chrome/'>下载谷歌浏览器点此链接</a>
      </div>
      </div>
    </div>
  <![endif]-->

猜你喜欢

转载自blog.csdn.net/weixin_49295900/article/details/108317667