将 p-面板菜单图标移至右侧

问题描述 投票:0回答:1

我尝试在primeng中使用面板菜单。

enter image description here

但我想要右侧的箭头图标。像这样....

enter image description here

css angular primeng
1个回答
6
投票

你可以通过 CSS 做到这一点:

.p-panelmenu-icon {
 order: 1; // to be the first item on right side.
}
.p-menuitem-text {
 flex-grow: 1; // to fill the whole space and push the icon to the end
}

更新:

.p-icon-wrapper {
  order: 1;
  margin-inline-start: auto;
}
© www.soinside.com 2019 - 2024. All rights reserved.