Javascript 如何从twitter小部件中获取徽标
我正在使用Twitter本身的Twitter小部件。 你可以在 现在我得到了这个代码:Javascript 如何从twitter小部件中获取徽标,javascript,html,css,twitter,Javascript,Html,Css,Twitter,我正在使用Twitter本身的Twitter小部件。 你可以在 现在我得到了这个代码: <script src="http://widgets.twimg.com/j/2/widget.js"></script> <script> new TWTR.Widget({ version: 2, type: 'profile', rpp: 4, interval: 6000, width: 180, height: 320, theme:
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 4,
interval: 6000,
width: 180,
height: 320,
theme: {
shell: {
background: '#6e6e6e',
color: '#ffffff'
},
tweets: {
background: '#fefefe',
color: '#545454',
links: '#b05c5c'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'
}
}).render().setUser('SchmidtGlobal').start();
</script>
新TWTR.Widget({
版本:2,
键入:“配置文件”,
rpp:4,
间隔时间:6000,
宽度:180,
身高:320,
主题:{
外壳:{
背景:“#6e6e”,
颜色:“#ffffff”
},
推特:{
背景:“#fefefe”,
颜色:'#5454',
链接:“#b05c5c”
}
},
特点:{
滚动条:false,
循环:false,
生活:假,
hashtags:true,
时间戳:对,
阿凡达:错,
行为:“全部”
}
}).render().setUser('SchmidtGlobal').start();
当我把它嵌入我的网站时,我会在左上方看到我的徽标。
有没有可能把这个弄出来
它指的是这个脚本:
任何帮助都将不胜感激
感谢您的光临,这里定义了徽标的位置:
var logo = isHttps ? 'https://twitter-widgets.s3.amazonaws.com/i/widget-logo.png' : 'http://widgets.twimg.com/i/widget-logo.png';
并在此处嵌入HTML:
<a target="_blank" href="http://twitter.com"><img alt="" src="' + logo + '"></a>
我高度怀疑删除调用setProfileImage
的行就足够了:
this.setProfileImage(resp[0].user.profile_image_url);
您会注意到的唯一一件事是,标题现在将过于右侧。您必须覆盖此CSS规则:
.twtr-widget-profile h3, .twtr-widget-profile h4 {
margin: 0 0 0 40px !important;
}
最简单的方法是使用CSS。创建CSS文档并将其链接到您的网页。在css粘贴中:
.twtr-hd, .twtr-ft{display: none;}
这将删除页眉和页脚。希望这有帮助 findtwtr hd在脚本中,添加
style="display:none"
style="display:none"
在脚本中找到twtr ft,添加
style="display:none"
style="display:none"
这应该可以做到
受启发,请注意完整的文档来源位于,您可以修改它。谢谢,但我认为您是在将我指向twitter徽标,对吗?我真正的意思是我自己的个人资料图片,我想摆脱它。@Justmac:更新了我的答案;顺便说一句,我想我们生活/工作得很近。我认为你的网页设计页面有一个错误,因为文本现在是一个大的超链接谢谢你,马塞尔!很高兴知道你也在乌得勒支生活/工作:-)。过几天我会去看看。我现在必须先做一些其他的工作。