angular 7全局变量_如何使用CSS变量为Angular 7应用创建主题

angular 7全局变量

In this post, we will build a super simple cryptocurrency listing app using Angular 7 and CSS variables.

在本文中,我们将使用Angular 7和CSS变量构建一个超级简单的加密货币列表应用程序。

目录 (Table of Contents)

设计 (Design)

Feel free to skip this section if you’re only here for the code.

如果仅在此处查看代码,请随时跳过本节

I designed this simple app using Figma.

我使用Figma设计了这个简单的应用程序。

配色方案 (Color Scheme)

Our color scheme is made up of foreground, background, primary, and error colors. Each color group has several lighter and darker variants of the base color.

我们的配色方案由前景色背景色, 原色错误色组成。 每个颜色组都有几种较浅和较深的基色变体。

For our light/dark themes, the foreground and background colors will simply swap.

对于我们的浅色/深色主题,前景色和背景色将简单地互换。

组件 (Components)

Next up is to create the components. Since our app is pretty small, we only have a couple of components.

下一步是创建组件。 由于我们的应用程序很小,因此我们只有几个组件。

The nav component, which will let our user toggle the theme.

导航组件,它将使我们的用户可以切换主题。

The tile component which will display coin info.

将显示硬币信息的图块组件。

Putting it all togeth

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值