iframe CSS Override for New Twitter Widget

后端 未结 8 1463
遇见更好的自我
遇见更好的自我 2021-01-04 07:03

I\'m trying to customise the new Twitter widget, but having some problems with the CSS and can\'t seem to override theirs on this new one. I\'ve tried searching for solution

相关标签:
8条回答
  • 2021-01-04 07:34

    I don't know if it was possible back then when the question was asked, but now it is, check the docs:

    <a class="twitter-timeline" data-chrome="nofooter" ....">Tweets</a>
    
    0 讨论(0)
  • 2021-01-04 07:35

    They create an iframe, so it is another document.

    You cannot style elements in another document, so it is not possible unless twitter provides a hook to embed your own stylesheet in their iframe..

    Twitter only allows to style the link color of the widget and pick a light/dark theme.


    Alternatively, you can create your own widget by using the twitter API and then you can style it anyway you want..

    0 讨论(0)
提交回复
热议问题