css 有2种大小的谷歌图标字体

wydwbb8l  于 2022-11-27  发布在  其他
关注(0)|答案(1)|浏览(210)

我需要两种菜单
一个带有小图标,一个带有大图标
我尝试过添加小班

<!DOCTYPE html>
<html>

<body>
<!doctype html>
<html lang="en">
  <head>
  
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@40,400,0,0" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
    
    <style>
    <style>
.material-symbols-outlined {
    font-variation-settings: "FILL"0,"wght"400,"GRAD"0,"opsz"40
}

.material-symbols-outlined-small {
    font-variation-settings: "FILL"0,"wght"100,"GRAD"0,"opsz"24

}

</style>
    
    </style>
    
    
  </head>
  
  <body>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
    
<ul class="dropdown-menu dropdown-menu-lg-end show" style=" margin: 0px; transform: translate3d(0px, 38.4px, 0px);" data-popper-placement="bottom-end">
                <li><a class="dropdown-item" href="#"><span class=" material-symbols-outlined align-middle">share</span>&nbsp;Export</a></li>
                <li><a class="dropdown-item" href="#"><span class="material-symbols-outlined align-middle">edit</span>&nbsp;Duplicate</a></li>
                <li><a class="dropdown-item tdelete" href="#"><span class="material-symbols-outlined align-middle">delete</span>&nbsp;Delete</a></li>
            </ul>
            

<ul class="dropdown-menu dropdown-menu-lg-end show" style="inset: 0px 0px auto auto; margin: 0px; transform: translate3d(0px, 38.4px, 0px);" data-popper-placement="bottom-end">
                <li><a class="dropdown-item" href="#"><span class=" material-symbols-outlined align-middle">share</span>&nbsp;Export</a></li>
                <li><a class="dropdown-item" href="#"><span class="material-symbols-outlined align-middle">edit</span>&nbsp;Duplicate</a></li>
                <li><a class="dropdown-item tdelete" href="#"><span class="material-symbols-outlined align-middle">delete</span>&nbsp;Delete</a></li>
            </ul>
            

  </body>
</html>
xu3bshqb

xu3bshqb1#

material-symbols-outlined是为Google材料符号保留的。您不能将其更改为material-symbols-outlined-small并期望Google材料符号可以工作。相反,请添加第二个类(例如small)。

错误:

<li><a class="dropdown-item" href="#"><span class="material-symbols-outlined-small align-middle">share</span>&nbsp;Export</a></li>

正确答案:

<li><a class="dropdown-item" href="#"><span class="material-symbols-outlined small align-middle">share</span>&nbsp;Export</a></li>

请参阅下面的片段。
第一次

相关问题