Переливающийся текст, как его сделать? (Css) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Переливающийся текст, как его сделать? (Css)

Здравствуйте, я русский, можно спросить: кто-нибудь знает как сделать такую вещь, (css) чтобы например было написано слово "Привет" и оно по одной букве переливалось, типо "П" - красная буква, потом через секунду "р" - красная, "П" - оранжевая, ну и т.д., и чтобы это было одно слово! (Я пытаюсь это сделать, но у меня не получается сделать из одного слова)

25th Oct 2019, 6:06 AM
Семён
17 Answers
+ 5
Работает?
5th Nov 2019, 8:05 AM
Anna/Аня
Anna/Аня - avatar
+ 3
Очень круто получилось, мне нравится, хочешь побольше цветов, попробуй добавить к анимации 10% { color: green}.
5th Nov 2019, 8:18 AM
Anna/Аня
Anna/Аня - avatar
+ 2
У меня есть идея)а если задать цвет текста градиентом а потом анимацию, один градиент меняет другой градиет. На первом все цвета красные р- красная, п-красная на втором первый цвет красный, второй оранжвый и получится р-красная, п-оранжевая и т.д
25th Oct 2019, 11:00 AM
Anna/Аня
Anna/Аня - avatar
+ 1
Вот смотри: (css) body{ background: #2b2b2b; margin: 0; padding: 0; } .loader{ position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%); } .loader span{ font-family: arial; font-size: 35px; color: gray; display: inline-block; transition: all .5s; animation: animate 2s infinite; } .loader span:nth-child(1) { animation-delay: .1s; } .loader span:nth-child(2) { animation-delay: .2s; } .loader span:nth-child(3) { animation-delay: .3s; } .loader span:nth-child(4) { animation-delay: .4s; } .loader span:nth-child(5) { animation-delay: .5s; } .loader span:nth-child(6) { animation-delay: .6s; } .loader span:nth-child(7) { animation-delay: .7s; } @keyframes animate{ 0%{ color: red; transform: translateY(0); margin: 0; } 25%{ color: white; transform: translateY(-15px); margin-le
5th Nov 2019, 8:01 AM
Семён
+ 1
(html) <!DOCTYPE html> <html lang=""> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Loading page</title> <link rel="stylesheet" href="../css/style1.css"> </head> <body> <div class="container loader"> <span>L</span> <span>O</span> <span>A</span> <span>D</span> <span>I</span> <span>N</span> <span>G</span> </div> </body> </html>
5th Nov 2019, 8:01 AM
Семён
+ 1
У меня получилось!) Смотри: /*сделал Семён!) (Created Семён)*/ body{ background: #2b2b2b; margin: 0; padding: 0; } .loader{ position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%); } .loader span{ font-family: arial; font-size: 35px; color: gray; display: inline-block; transition: all .5s; animation: animate 2s infinite; } .loader span:nth-child(1) { animation-delay: .1s; } .loader span:nth-child(2) { animation-delay: .2s; } .loader span:nth-child(3) { animation-delay: .3s; } .loader span:nth-child(4) { animation-delay: .4s; } .loader span:nth-child(5) { animation-delay: .5s; } .loader span:nth-child(6) { animation-delay: .6s; } .loader span:nth-child(7) { animation-delay: .7s; } @keyframes animate{ 0%{ color: white; transform: translateY(0); margin: 0; } 10%{ color:purple;
5th Nov 2019, 9:43 AM
Семён
+ 1
Это код в css мне нравится!)))
5th Nov 2019, 9:43 AM
Семён
+ 1
Не догадался) (а это как?) Я не знаю как это сделать!)))
6th Nov 2019, 8:59 AM
Семён
0
Можно по подробнее
5th Nov 2019, 7:49 AM
Семён
0
Посмотри что будет, и как сделать
5th Nov 2019, 8:02 AM
Семён
0
Я вот как раз по пробовал, а он работать перестал
5th Nov 2019, 8:49 AM
Семён
0
А что исходник в виде ссылки не бывает выложить?????
6th Nov 2019, 5:23 AM
UraL
0
)))
6th Nov 2019, 8:59 AM
Семён
0
Ха, скопируй текст кода и создай код
6th Nov 2019, 10:11 AM
UraL
0
Выбери код web. Там css, php html js
6th Nov 2019, 10:12 AM
UraL
0
Типа того
6th Nov 2019, 10:13 AM
UraL