DTCMS视频模版更改,

时间:2021-07-24 10:48:10

1、去掉style.css中视频的高度

.video-box{ position:relative; width:100%; height:473px; _clear:both; _display:inline; }

去掉:height:473px;

2、更改JS代码

 //初始化视频容器
if('{model.fields[video_src]}'!=''){
initCKPlayer('video-box', '{model.fields[video_src]}', '{config.webpath}scripts/ckplayer/ckplayer.swf');
$(".video-box").height(473);
}
//改变大小函数
function winResize() {
if ('{model.fields[video_src]}'!= '') {
if ($(".section").width() == 1180) {
$(".video-box").width(840);
$(".video-box").height(473);
} else {
$(".video-box").width(601);
$(".video-box").height(338);
}
}
}