我在sheet-modal里面放了一个音频元素。
这里是fiddle(或在“整页”模式下使用以下代码段);
但是,每当关闭工作表时,音频也会停止。 即使关闭床单,我如何仍能听到声音?
var app = new Framework7({
root: '#app',
rtl: true,
theme: 'md'
});
app.views.create('#mainView', {});
<link href="https://cdnjs.cloudflare.com/ajax/libs/framework7/2.3.0/css/framework7.rtl.md.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/framework7/2.3.0/js/framework7.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="app">
<div class="panel panel-left panel-cover theme-dark">
<div class="page"></div>
</div>
<div class="panel panel-right panel-reveal theme-dark">
<div class="page"></div>
</div>
<div class="view view-main ios-edges">
<div class="page" data-name="home">
<!-- In data-sheet attribute we specify CSS selector of sheet we need to open -->
<p><a href="#" data-sheet=".my-sheet" class="sheet-open">Open Sheet</a></p>
<!-- And somewhere in DOM -->
<div class="sheet-modal my-sheet">
<div class="sheet-modal-inner">
<!-- Link to close sheet -->
<a class="link sheet-close">Close</a>
<audio src="https://flagdom.com/flag-resources/anthem.php?country=Israel" controls></audio>
</div>
</div>
</div>
</div>
</div>