我正在尝试显示一个带有彩色灯箱的HTML5。我这样做是这样的:
var html ='<video>'+sources+'</video>';
$.colorbox({html:html});其中sources是包含源标记的html的变量。我的问题是,即使colorbox lightbox出现,视频也不会显示。我已经用Firebug检查过了,整个html都在那里。你知道为什么它不会显示出来吗?
谢谢。
发布于 2013-04-17 18:33:59
您可以使用内联html模式显示它。
$( document ).ready( function() {
$( '#openColorbox' ).colorbox( {
inline : true,
width : '80%',
height : 'auto',
href : '#inlinevideocontent'
} );
} );这是您的内联div
<div style='display:none'>
<div id='inlinevideocontent' >
<video controls="controls" src="video.mp4" />
</div>
</div>https://stackoverflow.com/questions/8854000
复制相似问题