gpt4 book ai didi

javascript - 检查浏览器是否全屏

转载 作者:IT王子 更新时间:2023-10-29 03:07:42 26 4
gpt4 key购买 nike

<分区>

有没有办法检查浏览器当前是否处于全屏模式(在用户按下 f11 后)?

类似于:

if (window.fullscreen) {
// it's fullscreen!
}
else {
// not fs!
}

谢谢。

Steerpike 的回答很好,但是我的评论:

Thanks a lot, but this answer is notsufficient for FF. In Chrome I can seta small tolerance, but in FF theurlbar and tabs takes a while todisappear, which means after pressingf11, the detected window.innerWidth isstill too small.

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com