gpt4 book ai didi

javascript - 增加 md-menu 内的 md-icon 大小

转载 作者:太空宇宙 更新时间:2023-11-04 10:39:42 24 4
gpt4 key购买 nike

我正在使用 angular-material 在 angularjs 1.5.0 中编写我网站的客户端。

我想要一个打开弹出菜单的按钮。我一直遇到的问题是图标看起来非常小,我不知道如何增加它的大小。

这是 $mdIconProvider 配置:

app.config(function($mdIconProvider) {
// Configure URLs for icons specified by [set:]id.
$mdIconProvider
.icon('menu', 'svg/menu.svg');
});

这是菜单图标和弹出菜单的代码:

<md-menu id="mainmenu" md-position-mode="target-right target">
<md-button aria-label="Open demo menu" class="md-icon-button" ng-click="$mdOpenMenu($event)">
<md-icon md-menu-origin md-svg-icon="menu"></md-icon>
</md-button>
<md-menu-content width="4">
<md-menu-item>
<md-button ng-click="changePage('/')">
<div layout="row">
<p flex>Home</p>
<md-icon md-menu-align-target md-svg-icon="svg/home.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
<md-menu-item ng-show="!isAuthenticated()">
<md-button ng-click="changePage('/login')">
<div layout="row">
<p flex>Login</p>
<md-icon md-menu-align-target md-svg-icon="svg/home.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>

<md-menu-item ng-show="isAuthenticated()">
<md-button ng-click="changePage('inventory')">
<div layout="row">
<p flex>Inventory</p>
<md-icon md-menu-align-target md-svg-icon="svg/inventory.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
<md-menu-item ng-show="isAuthenticated()">
<md-button ng-click="changePage('add-drink')">
<div layout="row">
<p flex>Ad Drink</p>
<md-icon md-menu-align-target md-svg-icon="svg/add_drink.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
<md-menu-item ng-show="isAuthenticated()">
<md-button ng-click="changePage('add-cocktail')">
<div layout="row">
<p flex>Add Cocktail</p>
<md-icon md-menu-align-target md-svg-icon="svg/add_cocktail.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
<md-menu-item ng-show="isUserGroupAllowed(1)">
<md-button ng-click="changePage('admin-generic-drinks')">
<div layout="row">
<p flex>Admin Generic Drinks</p>
<md-icon md-menu-align-target md-svg-icon="svg/admin_cocktails.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
<md-menu-item ng-show="isUserGroupIdAllowed(1)">
<md-button ng-click="changePage('admin-drinks')">
<div layout="row">
<p flex>Admin Drinks</p>
<md-icon md-menu-align-target md-svg-icon="svg/admin_cocktails.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
<md-menu-item ng-show="isUserGroupIdAllowed(1)">
<md-button ng-click="changePage('admin-cocktails')">
<div layout="row">
<p flex>Admin Cocktails</p>
<md-icon md-menu-align-target md-svg-icon="svg/admin_cocktails.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
<md-menu-item ng-show="isUserGroupIdAllowed(1)">
<md-button ng-click="changePage('admin-glasses')">
<div layout="row">
<p flex>Admin Glasses</p>
<md-icon md-menu-align-target md-svg-icon="svg/admin_cocktails.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
<md-menu-item ng-show="isUserGroupIdAllowed(1)">
<md-button ng-click="changePage('admin-pending-images')">
<div layout="row">
<p flex>Admin Pending Images</p>
<md-icon md-menu-align-target md-svg-icon="svg/admin_pending_images.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
<md-menu-item ng-show="isAuthenticated()">
<md-button ng-click="changePage('logout')">
<div layout="row">
<p flex>Logout</p>
<md-icon md-menu-align-target md-svg-icon="svg/logout.svg" style="margin: auto 3px auto 0;"></md-icon>
</div>
</md-button>
</md-menu-item>
</md-menu-content>
</md-menu>

那么....我该如何增加 md-icon 的大小?

最佳答案

您需要在 css 或 apply this setting 中提供高度和宽度或 this

关于javascript - 增加 md-menu 内的 md-icon 大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35908478/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com