<script type="text/jscript">
window.onload=function(){
changeDivHeight();
}
//当浏览器窗口大小改变时,设置显示内容的高度
window.onresize=function(){
changeDivHeight();
}
function changeDivHeight(){
var aw = $(".article-content").width();
var awe = $(".article-content").height();
$(".article-content>div").width(aw);
$("#a1").width(aw);
$("#a1 object").width(aw);
$("#a1 embed").width(aw);
$("#a1").height(awe);
$("#a1 object").height(awe);
$("#a1 embed").height(awe);
}
</script>
代码中红色区需要替换下你的需要适应的div层。
你的这个DIV CSS属性可以设置为
/*手机端视频控制播放器大小*/
.article-content {
line-height: 25px;
font-size: 16px;
width: 100%;
height:320px;
}
调用地方这样调用<div class="article-content"> <script src="{dede:global.cfg_cmsurl/}/ckplayer/ckplayer_common.php?id=1" language="javascript"></script>
{dede:include filename="plus/ckplayer.htm"/} </div>
发表评论