ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    使用JS实现窗口最大化和最小化——提高交互体验

    Jun 6, 20232 min read

    可以使用 window.resizeTo(width,height) 方法实现最大化和最小化窗口。

    最大化窗口代码示例:

    window.resizeTo(screen.availWidth, screen.availHeight);
    

    最小化窗口代码示例:

    window.resizeTo(200, 200); // 修改宽高为任意非全屏大小
    

    注意:这两种方式要求浏览器窗口不受限制,否则可能无法最大化。

    相关文章

    Yann LeCun's Latest Talk Pure Language Models Will Never Reach Human-Level Intelligence

    Yann LeCun argues that pure language models will never achieve human-level intelligence and advocates for new AI architectures that learn from and interact with the physical world to develop reasoning and planning capabilities.

    TS 事件类型合集

    TS 事件类型合集提供了不同事件及其对应的参数类型,参考自 MDN 文档。

    Copilot 开始付费了, 如何白嫖

    GitHub Copilot is now paid, but remains free for maintainers of popular open source projects on GitHub and verified students through the GitHub Global Campus Program.

    Nextjs 生成页面head标签 next:head的配置

    使用Next.js的`next/head`组件可以配置页面`head`标签,通过设置唯一`key`属性避免标签重复渲染。

    Flutter RotatedBox 组件

    RotatedBox是一个Flutter组件,用于在布局阶段旋转其子widget,通过设置quarterTurns属性实现90度的整数倍旋转。