关于第三方图标(MDUI内置第三方)问题

一名苦逼初三作业党

直接复制了图标下的兼容所有浏览器的那段代码,插入到我的div标签下

结果只能显示个文字,图标全部无法显示,(现代兼容与所有兼容都试过了)

ajax调用的页面,是不是父页面有什么css类冲突了?


子页面与其关联的css代码如下:

<div id="drawer" state="hide">
  <ul class="mdui-list">
    <li class="mdui-list-item mdui-ripple">
      <i class="mdui-icon material-icons">dashboard</i>
      <div class="mdui-list-item-content" onclick="dashBoard('HomePage_dashBoard.html')">仪表盘</div>
    </li>
  </ul>
</div>
<div id="RightPageContext">

#drawer {
    margin-left: -250px;

    height: 100%;
    width: 250px;
    background-color: rgb(60, 60, 60);
    text-align: center;
    float: left;

    /*transition: margin-left 0.5s;*/ 
  }

父页面div与其关联的css

  <!-- 主内容界面 -->
  <div id="MainPageContext">

  </div>

#MainPageContext {
      overflow: hidden;
      width: 100%;
    }


挺迷的。。照抄了“在线调试”也没有解决

浏览器:谷歌Chrome 浏览器 (应该没什么影响)

共 4 个回答
一名苦逼初三作业党

18个 Failed to decode downloaded font: <URL>

9个 OTS parsing error: Size of decompressed WOFF 2.0 is less than compressed size

9个 OTS parsing error: incorrect file size in WOFF header


好像的确是

MDUI 作者

打开控制台,network 中看看图标字体文件是不是没加载

一名苦逼初三作业党

看来是我想太多了QWQ

一名苦逼初三作业党

刚刚把整个示范clone到本地,也是凉

<i class="mdui-icon"><svg t="1579755613918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4693" width="32" height="32"><path d="M479.735496 201.142857A13.805714 13.805714 0 0 0 466.204067 187.337143c-46.811429 0-86.4-28.982857-105.508571-42.971429-4.388571-3.2-7.862857-5.668571-10.24-7.131428a13.805714 13.805714 0 0 0-14.08 23.862857c1.828571 1.097143 4.571429 3.108571 8.045714 5.668571C365.632638 182.857143 410.158353 215.131429 466.204067 215.131429A13.897143 13.897143 0 0 0 479.735496 201.142857zM600.512638 513.188571l-82.285714-41.782857a16.365714 16.365714 0 0 0-12.982857 0l-1.371429 0.548572-82.285714 41.782857a13.897143 13.897143 0 0 0 12.525714 24.777143L511.918353 499.748571l76.16 38.125715a13.897143 13.897143 0 0 0 12.525714-24.777143z" p-id="4694"></path><path d="M911.46121 0H112.375496A57.782857 57.782857 0 0 0 54.775496 57.782857v544.365714a57.782857 57.782857 0 0 0 57.6 57.782858H155.346924a61.805714 61.805714 0 0 0 14.628572 23.68 14.171429 14.171429 0 0 0 6.491428 3.84c72.137143 18.742857 90.057143 42.057143 94.354286 54.308571a66.102857 66.102857 0 0 1 4.297143 22.948571V1024h27.428571V761.874286a88.228571 88.228571 0 0 0-5.028571-28.617143c-10.24-30.628571-47.177143-54.857143-109.714286-71.588572a24.137143 24.137143 0 0 1-6.765714-15.451428 21.302857 21.302857 0 0 1 9.782857-15.908572h0.548571a47.634286 47.634286 0 0 1 6.034286-3.748571l1.554286-0.822857a79.451429 79.451429 0 0 1 9.142857-3.474286 115.565714 115.565714 0 0 1 27.428571-2.742857 301.714286 301.714286 0 0 1 83.748572 14.08c5.211429 2.285714 10.514286 4.662857 15.817143 7.497143l4.845714 2.742857c6.674286 3.748571 13.257143 7.862857 20.022857 12.434286l1.737143 1.097143C460.535496 727.04 455.598353 764.434286 454.866924 768h27.428572c1.737143-18.285714-6.948571-54.857143-71.954286-108.068571h203.154286C548.489781 713.142857 539.804067 749.714286 541.266924 768h27.428572c-0.822857-4.022857-5.668571-41.325714 93.897142-111.542857l1.737143-1.097143c6.674286-4.662857 13.348571-9.142857 20.022857-12.434286l4.845715-2.742857c5.302857-2.834286 10.514286-5.211429 15.817143-7.497143a301.714286 301.714286 0 0 1 83.748571-14.08 115.565714 115.565714 0 0 1 27.428571 2.742857 79.451429 79.451429 0 0 1 9.142858 3.474286l1.554285 0.822857a47.634286 47.634286 0 0 1 6.034286 3.748572h0.548571a21.302857 21.302857 0 0 1 9.782858 15.908571 24.137143 24.137143 0 0 1-6.765715 15.451429c-62.537143 16.822857-99.382857 40.96-109.714285 71.588571a88.32 88.32 0 0 0-5.028572 28.617143V1024h27.428572V764.617143a66.102857 66.102857 0 0 1 4.297142-22.948572c4.205714-12.16 22.125714-35.565714 94.354286-54.308571a14.171429 14.171429 0 0 0 6.491429-3.84A61.805714 61.805714 0 0 0 868.489781 659.931429h42.971429a57.782857 57.782857 0 0 0 57.6-57.782858V57.782857A57.782857 57.782857 0 0 0 911.46121 0zM321.198353 523.794286c17.005714 44.068571 6.582857 69.211429-0.64 79.908571l-3.657143-1.371428a217.234286 217.234286 0 0 0-47.451429-12.251429l-3.931428-0.548571a192 192 0 0 0-20.571429-1.28h-4.388571c-5.485714 0-10.788571 0.548571-15.908572 1.188571l-4.022857 0.457143-3.108571 0.64c4.845714-22.948571 8.045714-56.868571-6.948572-79.542857-16.091429-24.411429-19.84-94.72 0-151.497143 8.411429-24.502857-1.737143-68.662857-9.142857-93.897143h122.697143a206.262857 206.262857 0 0 1-6.765714 123.611429l-1.462857 4.114285c-10.057143 28.16-22.582857 58.24 5.302857 130.468572zM813.632638 511.177143c-14.994286 22.674286-11.794286 56.594286-6.948571 79.542857l-3.108571-0.64-4.022858-0.457143c-5.12-0.64-10.422857-1.005714-15.908571-1.188571h-4.388571a192 192 0 0 0-20.571429 1.28l-3.931429 0.548571a217.234286 217.234286 0 0 0-47.451428 12.251429l-3.657143 1.371428c-7.131429-10.697143-17.645714-35.84-0.64-79.908571 27.428571-72.32 15.36-102.308571 5.211429-130.377143l-1.462858-4.114286a206.262857 206.262857 0 0 1-6.765714-123.611428H822.775496c-7.131429 25.234286-17.371429 69.485714-9.142858 93.897143 19.565714 56.685714 15.817143 126.994286 0 151.405714z m128 90.514286a30.08 30.08 0 0 1-30.171428 30.08H868.489781a45.714286 45.714286 0 0 0-4.48-9.142858 56.777143 56.777143 0 0 0-4.297143-6.125714l-1.828571-1.737143-0.822857-0.822857a65.005714 65.005714 0 0 0-6.857143-5.942857l-2.651429-1.92c-1.828571-1.28-3.84-2.468571-5.942857-3.657143s-1.92-1.28-3.017143-1.828571l-1.097142-0.457143c-5.211429-17.737143-12.982857-56.045714-1.005715-74.057143 22.582857-34.194286 24.228571-115.382857 3.382857-175.817143-5.668571-16.548571 3.2-57.417143 11.611429-84.937143h5.394286a13.805714 13.805714 0 0 0 0-27.428571H677.86121a13.714286 13.714286 0 0 0-6.217143 26.057143 232.594286 232.594286 0 0 0 9.142857 134.491428l1.462857 4.205715c9.142857 25.051429 19.108571 48.457143-5.028571 110.994285-19.565714 50.651429-9.142857 83.748571 1.097143 101.485715l-2.742857 1.645714q-11.611429 6.308571-22.582858 13.714286l-2.651428 1.645714H373.86121l-2.651429-1.645714q-10.971429-7.405714-22.582857-13.714286l-2.742857-1.645714c10.422857-17.737143 20.662857-50.834286 1.097143-101.485715-24.137143-62.537143-13.988571-85.942857-5.028572-110.994285l1.462858-4.205715a232.594286 232.594286 0 0 0 9.142857-134.491428 13.714286 13.714286 0 0 0-6.582857-26.24H167.14121a13.805714 13.805714 0 0 0 0 27.428571h5.394286c8.411429 27.428571 17.371429 68.297143 11.611428 84.937143-20.845714 60.434286-19.291429 141.622857 3.382857 175.817143 11.977143 18.285714 4.205714 56.32-1.005714 74.057143l-1.097143 0.457143c-1.097143 0.548571-2.011429 1.28-3.017143 1.828571s-4.022857 2.377143-5.942857 3.657143l-2.834286 2.102857a65.005714 65.005714 0 0 0-6.582857 5.851429l-0.822857 0.822857-1.828571 1.737143a56.777143 56.777143 0 0 0-4.297143 6.125714 45.714286 45.714286 0 0 0-4.48 9.142857H112.375496A30.08 30.08 0 0 1 82.204067 601.691429V57.234286A30.08 30.08 0 0 1 112.375496 27.428571h799.085714A30.08 30.08 0 0 1 941.632638 57.234286z" p-id="4695"></path><path d="M684.078353 135.771429a13.714286 13.714286 0 0 0-10.422857 1.554285c-2.377143 1.462857-5.851429 3.931429-10.24 7.131429-19.108571 13.988571-58.697143 42.971429-105.508572 42.971428a13.897143 13.897143 0 0 0 0 27.428572c55.771429 0 100.571429-32.64 121.782857-48.274286 3.474286-2.56 6.217143-4.571429 8.045715-5.668571a13.897143 13.897143 0 0 0 4.754285-18.925715 13.714286 13.714286 0 0 0-8.411428-6.217142z" p-id="4696"></path></svg></i>


(如果能看到表情那就说明图标嵌入成功。。。)