V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
alphardex
V2EX  ›  问与答

chrome 插件开发:如何让插件弹窗 popup 持续悬浮在某个特定的网站上

  •  
  •   alphardex · 2020-08-06 10:38:48 +08:00 · 2027 次点击
    这是一个创建于 1351 天前的主题,其中的信息可能已经有所发展或是发生改变。

    查阅过很多答案,都是新建一个 popup 的 tab 。那有没有办法把它悬浮在页面的某个位置呢,就像 iframe 一样?

    3 条回复    2020-08-06 12:44:56 +08:00
    ooh
        1
    ooh  
       2020-08-06 11:07:40 +08:00
    翻译插件就是想浮动在哪就哪吗
    div + css 想飘哪不行?
    alphardex
        2
    alphardex  
    OP
       2020-08-06 12:37:36 +08:00
    @ooh 这个用 content-scripts 确实可以做到,但这样就无法使用浏览器相关的 API 了
    ooh
        3
    ooh  
       2020-08-06 12:44:56 +08:00
    @alphardex 比如?你这个特定网站浮窗是可以的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5725 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 02:12 · PVG 10:12 · LAX 19:12 · JFK 22:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.