angular - 有没有办法使用 ngx-translate 翻译 css 选择器(::after, ::before) 内容?
问题描述
有没有办法使用 ngx-translate 翻译 css selectors(::after, ::before) 内容?
.custom-file-label::after {
content: "Browse"
}
解决方案
在html中添加
<div class="custom-file-label" [attr.your-custom] = "{{ 'Browse' | translate}}"></div>
在CSS中
.custom-file-label::after {
content: attr(your-custom);
}
推荐阅读
- android - 如何在颤振上使用android的应用程序包?
- javascript - 使用 PostgreSQL 创建表
- uiview - UIViewController 与 ContainerView 和 UIView
- javascript - 从 Chrome 扩展中挂钩 Websocket
- windows - 在 UWP C++ 应用程序中找不到 DeviceIOControl API
- angular - 使用 Angular/Ionic 处理 googlemaps 标记
- postgresql - PostgreSQL 是否有办法创建有关特定表中数据的元数据?
- swift - 每次我点击按钮它只会增加 50 个增量,
- centos - su: 用户 sh 不存在
- java - 为什么 RESTful Web 服务不能正确调用 semaphore.acquire()?