-1

我正在尝试使用来自http://kiro.me/projects/textualizer.html的 js textualizer但它对我不起作用,我有一个 js fiddle 我想知道是否有人能解决这个问题。

http://jsfiddle.net/Zk2tr/2/

代码

html

<script src="https://raw.github.com/krisk/textualizer/master/textualizer.min.js"></script>
<div id="output"></div>
Not Working

js

var list = ['first blurb', 'second blurb', 'third blurb'];  // list of blurbs

var txt = $('#output');  // The container in which to render the list

var options = {
  duration: 1000,          // Time (ms) each blurb will remain on screen
  rearrangeDuration: 1000, // Time (ms) a character takes to reach its position
  effect: 'random',        // Animation effect the characters use to appear
  centered: true           // Centers the text relative to its container
}

txt.textualizer(list, options); // textualize it!
txt.textualizer('start'); // start
4

1 回答 1

1

试试这个例子:

http://jsfiddle.net/Zk2tr/9/

为了使其正常工作,您需要添加一些初始样式。例子:

#output {
  font-size: 40px;
  height: 200px;
  margin-top: 50px;
  padding: 10px;
  text-align: center;
  border: 1px solid gray;
}
于 2013-02-02T10:53:17.397 回答