{"id":1393,"date":"2023-05-06T13:15:20","date_gmt":"2023-05-06T10:15:20","guid":{"rendered":"https:\/\/notes.profidev.online\/?p=1393"},"modified":"2023-05-06T13:16:27","modified_gmt":"2023-05-06T10:16:27","slug":"text-slider-with-typing-animation-in-pure-css","status":"publish","type":"post","link":"https:\/\/notes.profidev.online\/ru\/effect\/1393\/","title":{"rendered":"Text typing animation in pure CSS"},"content":{"rendered":"<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"914\" height=\"507\" src=\"https:\/\/notes.profidev.online\/wp-content\/uploads\/2023\/05\/peek-2023-05-06-12-10.gif\" alt=\"Text slider with typing animation in pure CSS\" class=\"wp-image-1394 size-full\"\/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\"><\/p>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;cobalt&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\"> &lt;div class=&quot;typing-slider&quot;&gt;\n    &lt;p&gt;Text slider with&lt;\/p&gt;\n    &lt;p&gt;typing animation effect&lt;\/p&gt;\n    &lt;p&gt;in pure CSS.&lt;\/p&gt;\n  &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;cobalt&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">body {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\theight: 100vh;\n\tbackground-color: #FFCC00;\n  }\n  \n  @keyframes cursor {\n\tfrom, to {\n\t  border-color: transparent;\n\t}\n\t50% {\n\t  border-color: black;\n\t}\n  }\n  @keyframes typing {\n\tfrom {\n\t  width: 100%;\n\t}\n\t90%, to {\n\t  width: 0;\n\t}\n  }\n  @keyframes slide {\n\t33.3333333333% {\n\t  font-size: 3rem;\n\t  letter-spacing: 3px;\n\t}\n\tto {\n\t  font-size: 0;\n\t  letter-spacing: 0;\n\t}\n  }\n  .typing-slider {\n\tfont-family: Consolas, monospace;\n\tfont-weight: bold;\n\ttext-align: center;\n\twhite-space: nowrap;\n  }\n  \n  .typing-slider p {\n\tposition: relative;\n\tdisplay: inline;\n\tfont-size: 0;\n\ttext-transform: uppercase;\n\tletter-spacing: 0;\n\tanimation: slide 15s step-start infinite;\n  }\n  \n  .typing-slider p::after {\n\tcontent: &quot;&quot;;\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tborder-left: 3px solid black;\n\tbackground-color: #FFCC00;\n\tanimation: typing 5s infinite, cursor 1s infinite;\n  }\n  \n  .typing-slider p:nth-child(1) {\n\tanimation-delay: 0s;\n  }\n  .typing-slider p:nth-child(1)::after {\n\tanimation-delay: 0s;\n\tanimation-timing-function: steps(16), step-end;\n  }\n  \n  .typing-slider p:nth-child(2) {\n\tanimation-delay: 5s;\n  }\n  .typing-slider p:nth-child(2)::after {\n\tanimation-delay: 5s;\n\tanimation-timing-function: steps(23), step-end;\n  }\n  \n  .typing-slider p:nth-child(3) {\n\tanimation-delay: 10s;\n  }\n  .typing-slider p:nth-child(3)::after {\n\tanimation-delay: 10s;\n\tanimation-timing-function: steps(12), step-end;\n  }<\/pre><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1394,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[16,40],"class_list":["post-1393","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-effect","tag-htmlcss","tag-text"],"_links":{"self":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/comments?post=1393"}],"version-history":[{"count":2,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1393\/revisions"}],"predecessor-version":[{"id":1396,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1393\/revisions\/1396"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media\/1394"}],"wp:attachment":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media?parent=1393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/categories?post=1393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/tags?post=1393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}