大家好。
我需要将导航栏中的 #current-user(个人资料图片)项目替换为文本“profile”。
这样做最好的方法是什么?
我曾尝试在 #current-user a::before 中添加文本,
并将个人资料图片的 display 设置为 none,
但这也会隐藏通知。
期望的结果如下所示。

提前感谢。
大家好。
我需要将导航栏中的 #current-user(个人资料图片)项目替换为文本“profile”。
这样做最好的方法是什么?
我曾尝试在 #current-user a::before 中添加文本,
并将个人资料图片的 display 设置为 none,
但这也会隐藏通知。
期望的结果如下所示。

提前感谢。
I suppose you could create an image that contained the text “profile”. And just render that image instead of the avatar.
@blake, thanks for the response.
I am working on a new theme and I don’t think that would be optimal.
Do you think I could do it using the pluginAPI or a widget?
您好,
使用 CSS 也可以实现这一点。![]()
通用 > CSS
li#current-user {
a.icon {
padding: 0.2143em 0.5em;
border: 1px solid transparent;
border-bottom: none;
&:before {
content: "profile";
font-weight: 600;
}
img.avatar {
display: none;
}
}
}
// 对齐新用户菜单
.desktop-view {
.user-menu.revamped {
right: 0.25em;
}
}