如何使用CSS填充颜色的文本? [英] How to fill a text with color using CSS?

查看:369
本文介绍了如何使用CSS填充颜色的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用此精彩字体制作预测图标,而我尝试在图标之间进行组合使用CSS3动画他们,我试图使用云隐藏太阳,但我需要填充云彩的颜色,是可能的CSS,或者我需要把它放置为SVG或在Canvas?

I am using this wonderful font to make forecast icons, and while I try to combine between the icons to animate them using CSS3, I tried to hide the sun using the cloud, but I need to fill the cloud with color, is that possible with CSS, or I need to it put as SVG or in Canvas?

这是图片:


Here is the picture:

推荐答案

如果字体不包含实心云图像,则无法在CSS中执行此操作。

It's not possible to do this in CSS if the font doesn't contain a solid cloud image.

这是可能的SVG图像。幸运的是,字体下载包含了一些例子和SVG版本的字体,所以也许你可以从那里提取图片,并根据你的需要修改它。

It is possible to do this with an SVG image. Fortunately, the font download contains a number of examples and the SVG version of the font, so maybe you can extract the image from there and modify it to your needs.

,因为所有你需要的是云和太阳之间的白色背景,你可能会使用一个或两个CSS基本圆形形状,并使用字体本身更详细的云和太阳形状。

Actually, since all you need is a white background between the cloud and the sun, you might get away with using one or two CSS basic circle shapes, and use the font itself for the more detailed cloud and sun shapes.

这篇关于如何使用CSS填充颜色的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆