小编Dav*_*ers的帖子

Bootstrap 3 Carousel不起作用.(是的,我在Bootstrap之前加载了jQuery)

我正在将一个应用程序转换为Bootstrap 3.这是我的样本轮播页面的代码.是的,我在加载Bootstrap.js之前加载了jQuery.无论出于何种原因,旋转木马根本不起作用.具体来说:上一个/下一个按钮不起作用,并且轮播不会自动滑动到下一张幻灯片.

测试:

  • Safari 6.0.5
  • Chrome 28.0.1500.95
  • Firefox 23.0

...在Mac OS X 10.8.4上

<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <!--[if lt IE 9]>
        <script src="" alt-src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <script src="http://code.jquery.com/jquery.js"></script>

    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-glyphicons.css" type="text/css">

    <title>Carousel Test</title>
    <meta name="description" content="">
    <meta name="keywords" content="">

    <script>
        // Added this just so I didn't have to wait 5 seconds to see if the transition worked. //
        $(document).ready(function() {
            $('#Carousel').carousel({
                interval:   1000
            }); …
Run Code Online (Sandbox Code Playgroud)

jquery carousel twitter-bootstrap twitter-bootstrap-3

10
推荐指数
1
解决办法
3万
查看次数

Firefox不会使用HTML5 <audio>标签播放.WAV文件?

我正在构建一个允许用户上传MP3文件的页面.该MP3文件使用LAME在后端转换为.WAV文件.

蹩脚的执行脚本在这里:

LAME --resample 44.1 -decode myDirectoryPath/Master.mp3 myDirectoryPath/Master.wav
Run Code Online (Sandbox Code Playgroud)

但是,当我使用HTML5音频标签在Firefox中为该音频文件创建播放器时,它不起作用.

<!DOCTYPE HTML>
<html>

<head>
    <meta charset="UTF-8">
    <title>Test</title>
</head>

<body>
    <audio controls>
        <source src="myDirectoryPath/Master.mp3">
        <source src="myDirectoryPath/Master.wav">
    </audio>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

我读过的所有内容都说Firefox支持.wav文件......我找不到一个简单的.mp3到.ogg命令行工具来使用它将master.mp3转换为.ogg格式.有人可以提供一些关于下一步尝试的建议吗?

我在这里发布了适用于Safari和Chrome的代码:http: //www.wgbh.org/byers/Audio/index.html

无论出于何种原因,FF都不喜欢它.

更新 (随附facepalm)问题在于我的LAME解码.正确的语法是--decode有两个破折号而不是一个破折号.该系统实际上是将它从mp3编码为mp3,并将其命名为wav,而Mac上的Safari/Chrome则采用该文件类型.

audio firefox html5 html5-audio

7
推荐指数
1
解决办法
2万
查看次数