V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lry
V2EX  ›  前端开发

daisyui 的 modal 实现原理是啥

  •  
  •   lry · 2022-11-21 22:48:48 +08:00 · 993 次点击
    这是一个创建于 511 天前的主题,其中的信息可能已经有所发展或是发生改变。

    文档 https://daisyui.com/components/modal/ 里的 demo 里只有 css

    只用 label 和 checkbox 就实现了模态框的打开关闭,这个原理是什么

    我在 create-react-app 和 tailwindcss 只需要在 tailwind.config.js 里加上 plugins: [ require("daisyui"),] 就能用了。。

    2 条回复    2022-11-21 23:03:00 +08:00
    chloerei
        1
    chloerei  
       2022-11-21 22:51:36 +08:00   ❤️ 5
    刚好之前研究过,写了篇博客

    纯 CSS 实现 UI 组件的触发 https://geeknote.net/Rei/posts/1323
    lry
        2
    lry  
    OP
       2022-11-21 23:03:00 +08:00
    @chloerei 很有帮助
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5528 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 08:48 · PVG 16:48 · LAX 01:48 · JFK 04:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.