【问题标题】:How to prevent new line with TypeWriter effect in React?如何在 React 中防止带有 TypeWriter 效果的新行?
【发布时间】:2021-12-25 10:25:41
【问题描述】:

TypeWriter 效果在我实现时似乎插入了一个新行,但我真的希望它在同一行上读出。 见附件

请告知我如何在同一行中获得此信息?谢谢

<h3>
import Typewriter from 'typewriter-effect';
....

               I'm a {city} based <Typewriter options={{ strings: ['Software Engineer'],autoStart: true,loop: true,}}/>  
               {description}
            </h3>

【问题讨论】:

  • 你用的是什么 CSS

标签: javascript reactjs text alignment


【解决方案1】:

您可以使用display: inline-block;display: inline 添加css 规则;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多