function displayWindowSize(){
// Get width and height of the window excluding scrollbars
var w = document.documentElement.clientWidth;
var h = document.documentElement.clientHeight;
player.height = h - 100 + "px";
//player.setPlayerSize(w,h);
console.log("player height:", player.height);
}
// Attaching the event listener function to window's resize event
window.addEventListener("resize", displayWindowSize);
如题,我根据模板配置的:
如果我缩小窗口,播放器宽度会随着改变,但是高度设置成100%就会没有显示了。 还是说这个要通过js来实现? 这样试过也不行。