【问题标题】:Facebook messenger plugin would not closeFacebook Messenger 插件不会关闭
【发布时间】:2018-09-17 16:27:22
【问题描述】:

我在 HTML 的 HEAD 部分正上方添加了 messenger 插件脚本和 DIV。

插件无法按照https://developers.facebook.com/docs/messenger-platform/discovery/customer-chat-plugin#steps中的说明工作

无法关闭文本气泡。 插件不默认隐藏在移动设备上。 这些属性似乎也不起作用。 有什么想法吗?

【问题讨论】:

    标签: javascript facebook messenger


    【解决方案1】:

    我刚刚找到了解决办法:

    <style>
        .fb_customer_chat_bounce_out_v2 { animation-fill-mode: forwards; display: unset !important; }
        .fb_customer_chat_bounce_in_v2 { display: unset !important; }
        .fb_iframe_widget iframe { display: none; }
    </style>
    

    这对我有用。

    【讨论】:

    • 更新:很多人报告了这个问题link 并且已经修复了
    【解决方案2】:

    在 Facebook 修复此错误之前,您可以通过在其 .fb_customer_chat_bounce_out_v2 类中添加 display: none 来临时修复此错误:

    .fb_customer_chat_bounce_out_v2 { display: none; }

    【讨论】:

      【解决方案3】:

      如果您选择左方向 所以你可以添加这个css

      <style>
          @keyframes fb_bounce_in_from_right {
              0% {
                  opacity: 0;
                  transform: scale(0, 0);
                  transform-origin: bottom left
              }
              50% {
                  transform: scale(1.03, 1.03);
                  transform-origin: bottom left
              }
              100% {
                  opacity: 1;
                  transform: scale(1, 1);
                  transform-origin: bottom left
              }
          }
          @keyframes fb_bounce_out_from_right {
              0% {
                  opacity: 1;
                  transform: scale(1, 1);
                  transform-origin: bottom left
              }
              100% {
                  opacity: 0;
                  transform: scale(0, 0);
                  transform-origin: bottom left
              }
          }
      </style>
      

      【讨论】:

        猜你喜欢
        • 2018-06-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-08-11
        • 1970-01-01
        相关资源
        最近更新 更多