HTML引入第三方类库项目需要授权解决方案

来源:互联网 发布:sql 2012 offset 编辑:程序博客网 时间:2024/06/06 20:15

想必引入第三方类库项目需要授权,这个很多人都有遇到过吧,这里讲一下怎么解决这个问题。

如下图代码:

<!DOCTYPE html><html><head>    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">    <meta name="author" content="mayouchen" />    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">    <title></title></head><style type="text/css">    @charset "utf-8";    *{margin:0;padding:0;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);-webkit-box-sizing: border-box;-moz-box-sizing: border-box;}    html {        /*height:100%;*/        min-height: 100%;        font-size: 100%;        -webkit-text-size-adjust: 100%;        -ms-text-size-adjust: 100%;    }    body {        width: 100%;        /*height:100%;*/        min-height: 100%;        font-family:"Microsoft YaHei","微软雅黑","MicrosoftJhengHei","华文细黑","Helvetica", "Arial", "sans-serif";        font-size: 14px;        position: relative;        word-break:break-all;    }    a {        text-decoration: none;        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.35);        -webkit-box-sizing:border-box;    }    img {        -ms-interpolation-mode: bicubic;        vertical-align: middle;    }    img:not([src*="/"]) {        display: none;    }    table {        border-collapse: collapse;        border-spacing: 0;    }    textarea {        resize: none;    }    input, button, select, textarea {        -webkit-appearance:none;        outline: none;        border-radius: 0;    }    input::-webkit-outer-spin-button,    input::-webkit-inner-spin-button {        -webkit-appearance: none !important;        margin: 0;    }    ul,ol,li {        list-style: none;        -webkit-margin-before: 0;        -webkit-margin-after: 0;        -webkit-margin-start: 0;        -webkit-margin-end: 0;        -webkit-padding-start: 0;    }    .section-body .text  {        margin-top: 24px;        margin-left: 40px;        margin-right: 35px;        width: 84%;        font-family: "宋体";        font-size: 18px;    }    .section-body .textImg{        margin-top: 45px;        color: blue;        text-align: center;        vertical-align: middle;    }</style><script src=”http://libs.baidu.com/jquery/1.6.4/jquery.min.js”></script><body>    <div>基本手机端HTML结构</div></body></html>

这个时候页面是会报没有授权,如图:

这里写图片描述

这个意思就是因为引入第三方的类库,而这个类库没有授权,这个时候你需要做的其实很简单,那就换一个其他第三方类库(这个类库不需要授权)

例如:

<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script><script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script><script src="https://cdn.bootcss.com/jquery/3.2.1/core.js"></script>

这里推荐一个常使用的第三方类库地址:
http://www.bootcdn.cn/

这里写图片描述

这里的CDN全都是免费的,而且种类很多。

原创粉丝点击