Facebook plugin custom styles

Has anyone tried changing CSS in the new Facebook plugin? The old plugin is used to provide some options, such as the ability to select a color scheme. However, the new plugin is white around, and it doesn't seem to accept my custom CSS. Example:

    ._h7l {

      background: transparent !important;
      border: none !important;

    }

Any ideas on how we can get some CSS to work?

+4
source share
2 answers

You cannot change CSS. The content of the plugin is displayed inside the iframe, so you cannot change CSS or override any javascript method.

, , . , : https://developers.facebook.com/docs/plugins/page-plugin/

, .

+5

, , jQuery, https (https). ...

: jquery.waituntilexists.js

iframe Facebook, css:

$(".fb-page iframe").waitUntilExists(function(){
    $(".fb-page iframe").contents().find('head').append('
       <style>._h7l {
           background: transparent !important;
           border: none !important;}
       </style>
    ');
});
0

Source: https://habr.com/ru/post/1584537/


All Articles