这不仅仅是一个问题,而是一个问题,但为什么Cursor不起作用?我收集了整个代码,但它不起作用。
代码:
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-1.11.3.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.5/typed.js"></script>
<script src="js/particles.js"></script>
<script src="js/app.js"></script>
<script>
var options = {
strings: ["", "We create Graphics", "We create Motion Graphics", "We create Music", "We create 3D-Models", "We write Code", "We create Anything!"],
typeSpeed: 80,
backDelay: 700,
backSpeed: 100,
showCursor: true,
autoInsertCss: true,
}
var typed = new Typed(".typing", options);
</script>
JSFiddle:https://jsfiddle.net/nthd3o4p/
答案 0 :(得分:0)
使用最新的jQuery,最新的typed.js并且没有拼写错误(你的代码中有拼写错误),一切都按预期工作 - 试试这个:
var options = {
strings: ["HI im am cool", "HI im not cool"],
typeSpeed: 40
}
var typed = new Typed(".typing", options)
<p class="typing"></p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.5/typed.min.js"></script>
这是您的脚本,请参阅注释:
<script>
var options = {
strings: ["HI im am cool", "HI im not cool"],
typeSpeed: 40
}
var typed = new Typed(".typing", options);
}); // <-- this line is causing error, delete delete these closing brackets
</script>