【问题标题】:How to assign css to google plus share button in iframe?如何将css分配给iframe中的google plus分享按钮?
【发布时间】:2014-03-18 14:05:20
【问题描述】:

我的分享按钮的 CSS 有问题。 Google 的样式重置了我的 CSS。

这是我的 iframe:

<iframe src="https://apis.google.com/u/0/_/+1/fastbutton?usegapi=1&amp;size=tall&amp;origin=http%3A%2F%2Flocalhost&amp;url=http%3A%2F%2Fwww.infomovies.it%2Flocale.aspx%3Flocale%3D1&amp;gsrc=3p&amp;ic=1&amp;jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.it.C5yhGIzSUtg.O%2Fm%3D__features__%2Fam%3DAQ%2Frt%3Dj%2Fd%3D1%2Fz%3Dzcms%2Frs%3DAItRSTNNChyVUYjljlut1Guvhr2Y24lHpw#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Conload&amp;id=I0_1395148139488&amp;parent=http%3A%2F%2Flocalhost&amp;pfname=&amp;rpctoken=39693034"></iframe>

这是我的脚本:

<script>
$('iframe').load(function() {
    $('iframe').contents().find('head').append($('<link/>', { rel: 'stylesheet', href: '/css/masterBlaster.css', type: 'text/css' }));
});
</script>

【问题讨论】:

标签: css button iframe share


【解决方案1】:

您不能在 iframe 中编辑 css(或其他任何内容)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-12-10
    • 1970-01-01
    • 2013-11-26
    • 2014-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多