Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 在脚本中设置文本格式_Jquery_Formatting - Fatal编程技术网

Jquery 在脚本中设置文本格式

Jquery 在脚本中设置文本格式,jquery,formatting,Jquery,Formatting,嗨,我有一个打字机脚本如下: $(document).ready(function(){ $('.example4').typeIt({ whatToType: ["Introduction Thesis xy", "2"], typeSpeed: 150, breakLines: false }); }) 我想在论文xy之前加粗引言并换行,我怎么做?您需要设置特征线:true,您可以在文本中添加必要的html,使引言加粗,并在论文xy之前添加新行

嗨,我有一个打字机脚本如下:

$(document).ready(function(){
        $('.example4').typeIt({
     whatToType: ["Introduction Thesis xy", "2"],
     typeSpeed: 150,
     breakLines: false
});
})

我想在论文xy之前加粗引言并换行,我怎么做?

您需要设置
特征线:true
,您可以在文本中添加必要的html,使
引言加粗,并在
论文xy
之前添加新行

$(document).ready(function(){
   $('.example4').typeIt({
     whatToType: ["<b>Introduction</b><br>Thesis xy", "2"],
     typeSpeed: 150,
     breakLines: true
   });
})
$(文档).ready(函数(){
$('.example4')。键入它({
什么类型:[“引言
论文xy”,“2”], 打字速度:150, 特征线:正确 }); })
我认为在typeit js版本中使用html是不可能的。但是,如果您将版本更改为5.5.0,则可以通过这种方式进行更改

您可以使用此CDN加载typeit js

<script src="https://cdn.jsdelivr.net/npm/typeit@5.5.0/dist/typeit.min.js"></script>


哪里是
typeIt()的代码?你在用什么图书馆?另外,这个问题对我来说似乎很不清楚。这里是所有代码这里是你的更新代码,但这不是我想要的。“介绍”之后我怎么能换行<原因很明显,但我不知道还能怎么做