如何突出显示usingn type.js文本



我已经安装了这个type.js的基本版本,但在突出显示单词时遇到了问题。这是我的密码。请记住,这是Type.js basic的标准输出。

<h2 class="animated fadeInUp dealy-500 display-6 display-md-4 display-lg-3 font-weight-bold text-white">
<span class='highlight'>
<span id="typed"></span>
</span>
</h2>
new Typed('#typed', {
strings: ['IT Support', 'Security Infastructure', 'Managed IT Support', 'Web Development & Design'],
typeSpeed: 150,
delaySpeed: 190,
loop: true
});

https://codepen.io/Budhiluhoer/pen/GGaxxO

在CSS中,只需向span添加一个背景,如下所示:

#typed{
background: #ff0;
}

https://codepen.io/thomas-lamothe/pen/dyoWmqL

最新更新