don't work with my project
Yang03 opened this issue · comments
only create many div, without animation, and hide, need add css ?
Please provide more infomation.
Which browser? Which mode? How you initialize it?
is my test code
var danmaku = new Danmaku();
danmaku.init({
container: document.getElementById('app'),
});
function sendDanmaku(data) {
var comment = {
text: data,
style: {
fontSize: '20px',
color: '#ffffff'
},
};
danmaku.emit(comment);
}
setInterval(function() {
sendDanmaku('现在时间是:' + new Date().getTime());
}, 4000)
</script>
And you should make sure #app
has width and height.