Git Product home page Git Product logo

Comments (3)

jimmyrogue avatar jimmyrogue commented on July 21, 2024

@Kuari Hi,最近我也在完成一个毛玻璃效果的需求,我尝试在自己的电脑上运行这个项目,但并没有出现实际应该有的毛玻璃效果,我的系统版本的是macOS 11.4。不知道能不能给些帮助

from blog.

hunter-ji avatar hunter-ji commented on July 21, 2024

@Kuari Hi,最近我也在完成一个毛玻璃效果的需求,我尝试在自己的电脑上运行这个项目,但并没有出现实际应该有的毛玻璃效果,我的系统版本的是macOS 11.4。不知道能不能给些帮助

可以啊。我也刚拉了我的项目运行了下,毛玻璃效果没有问题,请问你运行了是什么样的呢?
image

from blog.

zyyv avatar zyyv commented on July 21, 2024

大佬你好👋,请教个问题,

@Kuari
一直在调试这种毛玻璃背景的效果,但是都出不来,请原谅我是一个electron新手

win = new BrowserWindow({
    width: 1280,
    height: 720,
    vibrancy: 'dark', // 'light', 'medium-light' etc
    visualEffectState: 'active',
    transparent: true,
    frame: false,
    // resizable: false,
    // title: 'Main window',
    // icon: join(ROOT_PATH.public, 'favicon.ico'),
    webPreferences: {
      preload,
      nodeIntegration: true, // 集成 Node.js
      contextIsolation: false,
      experimentalFeatures: true,
    },
    // backgroundColor: 'transparent',
    // titleBarStyle: 'hidden',
  })

控制台报错::( 看文档那几个值都被弃用了,不知道用哪个值比较合适

electron: NSVisualEffectMaterialDark has been deprecated and removed as of macOS 10.15.

我的版本:

macOS:13.0

devDependencies

{
  "electron": "^20.3.7",
  "electron-builder": "^23.3.3",
}

context

我的src里面的css

// main.css 
html {
  /* background: rgba(255, 255, 255, .1); */
  background: hsla(0, 0%, 100%, 0.2);
  backdrop-filter: blur(200px);
}

最后失败结果:
image

from blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.