首页 > 其他分享 >screefull全屏

screefull全屏

时间:2022-10-17 10:02:18浏览次数:43  
标签:isEnabled isFullscreen screefull toggle 全屏 screenfull

1.安装
npm install screenfull@5 --save


2.使用
import screenfull from "screenfull";

screenfull.isFullscreen; // 当前页面是否全屏
screenfull.isEnabled; // 当前浏览器是否支持全屏

screenfull.request(); // 全屏
screenfull.exit(); // 退出全屏
screenfull.toggle(); // 全屏切换

标签:isEnabled,isFullscreen,screefull,toggle,全屏,screenfull
From: https://www.cnblogs.com/jlyuan/p/16798100.html

相关文章