marquee仅适用于localhost?

时间:2014-07-01 22:21:00

标签: jquery html css

所以我知道marquee是一个可怕的标签,但我想它可以完成这一特定部分的工作。我在文本行上添加了一个marquee标签,当我在本地运行它时它可以工作但是当我将它上传到我的ubuntu服务器时,文本甚至不显示!有什么想法吗?或另类(在jquery中)或其他什么?

PS。我将文本附加到jquery中。

HTML:

 <marquee behavior="scroll" direction="left" scrollamount = "1" onmouseover="this.stop();" onmouseout="this.start();" width = "50px" id="player_title_display"></marquee>

的CSS:

#player_title_display {
        font-weight: bold;
        font-size: 14px;
        height: 22px;
        width: 80px;
        text-align: center;
        margin-left: 72.5px;

    }

1 个答案:

答案 0 :(得分:2)

这是一个jquery替代品,因为你问了一个。您可以找到更多详细信息here。您的HTML标记如下所示

<div class="marquee">Your marqueee text goes here </div>

和你的css

.marquee {
width: 300px;
overflow: hidden;
border: 1px solid #ccc;
background: #ccc;
}

并将插件引用为

<script type='text/javascript' src='//cdn.jsdelivr.net/jquery.marquee/1.3.1/jquery.marquee.min.js'></script>

最后你的js函数$('.marquee').marquee();