简体   繁体   中英

How to achieve this CSS effect

I was wondering how the guys who made carv.ai achieved the text masking effect on the paragraph "Carv connects wirelessly ...".

I know that we can mask a background image on a text.

The first thing that you can do to have text masking, is either give the masking div a greater z-index than the text, or make the text the same color as the masking color. Then you can use jQuery to make the div slide away.

Here is the jQuery:

$("#id").animate({width:'toggle'},350);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM