使用 Nativescript 核心主题时可以使用自定义 css 吗?
Possible to use custom css when using a Nativescript core theme?
我正忙于 Nativescript 应用程序,我正在使用核心深色主题,但想添加一些字体超赞的字形图标和自定义 css。我在我的全局 app.css 中导入了核心深色主题,但在导入主题后似乎无法在该文件中执行更多操作...我已尝试添加特定于页面的内容 css通过将 component-common.css 添加到特定页面但是当我将 styleUrls: [...] 声明添加到组件声明时,我总是会遇到运行时错误...是否有可能使用自定义 css 在核心 Nativescript 主题之上?如果是这样,我将如何处理它(使用 css 文件而不是 xml 中的内联文件)?
是的,可以同时使用主题和自定义 CSS 文件。
例如,勾选 this sample where in the same time theme has been applied to the top CSS file.
最好检查 (and/or post) 您的运行时错误 - 它可能会告诉您应用抛出错误的原因。可能是由于您的 styleeUrls 的 non-existing 路径 !?
我正忙于 Nativescript 应用程序,我正在使用核心深色主题,但想添加一些字体超赞的字形图标和自定义 css。我在我的全局 app.css 中导入了核心深色主题,但在导入主题后似乎无法在该文件中执行更多操作...我已尝试添加特定于页面的内容 css通过将 component-common.css 添加到特定页面但是当我将 styleUrls: [...] 声明添加到组件声明时,我总是会遇到运行时错误...是否有可能使用自定义 css 在核心 Nativescript 主题之上?如果是这样,我将如何处理它(使用 css 文件而不是 xml 中的内联文件)?
是的,可以同时使用主题和自定义 CSS 文件。 例如,勾选 this sample where in the same time theme has been applied to the top CSS file.
最好检查 (and/or post) 您的运行时错误 - 它可能会告诉您应用抛出错误的原因。可能是由于您的 styleeUrls 的 non-existing 路径 !?