问题:下面的图表只是部分全屏。如何在全屏时拉伸此元素以填充屏幕的整个可视区域?
我正在使用的全屏功能:
function toggleFullscreen(elem) { //function to make element (cell) fullscreen on most browsers
elem = elem || document.documentElement;
if (!document.fullscreenElement && !document.mozFullScreenElement &&
!document.webkitFullscreenElement && !document.msFullscreenElement) {
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.msRequestFullscreen) {
elem.msRequestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
}
}
回拨到全屏:
var $saved_cell = $('.cell.code_cell.rendered.selected > div.output_wrapper > div.output > div > div.output_subarea.output_html.rendered_html');
$saved_cell.each(
function() { toggleFullscreen(this) } ).css({
'background-color' : 'rgb(244,244,244)',
'position': 'absolute',
'z-index': '9999',
'min-width': '100%',
'height': '100vh',
'margin': '0',
'padding': '0',
'overflow': 'auto'
}); //expand selected cell
此外,这是围绕所选元素的DOM的屏幕截图:
答案 0 :(得分:0)