<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="css/bootstrap-theme.min.css" rel="stylesheet" media="screen">
<!-- Main CSS -->
<link href="style.css" rel="stylesheet" media="screen">
<!-- Responsive Framework -->
<link href="responsive.css" rel="stylesheet" media="screen">
<!-- Fontawesome CSS -->
<link href="font-awesome-4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- scrollbox Script -->
<script src="js/jquery.scrollbox.js"></script>
<script type="text/javascript">
$('#demo').scrollbox({
linear: true,
step: 1,
delay: 0,
speed: 100
});
</script>
</head>
<body>
<div class="row">
<div class="col-lg-6" id="demo">
<ul>
<li><a href="#">This text will scroll from bottom to up</a></li>
<li><a href="#">This text will scroll from bottom to up</a></li>
<li><a href="#">This text will scroll from bottom to up</a></li>
</ul>
</div>
</div>
</body>
</html>
这是我原创的滚动条代码。它还没有工作..... 首先,我附加了谷歌apis,然后从Github导入的滚动条脚本,然后功能和列表与div调用id =“demo”
答案 0 :(得分:3)
我添加了一些像CSS和更多要滚动的项目。
然后我从GitHub导入了滚动框并更改了样式
$('#demo').scrollbox({
linear: true,
step: 1,
delay: 0,
speed: 100
});
现在可行了
答案 1 :(得分:2)
您的<script>
代码应该被反转,因为scrollbox.js取决于jquery:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="js/jquery.scrollbox.js"></script>
一般来说,当您预期的事情没有发生时,首先要检查的是开发人员工具中的错误日志(只需在IE,FF或Chrome中按F12)。