我試圖將這個Twitter供稿輸出到右列中的標記,但我無法弄清楚如何使它工作。看起來代碼被設置爲打印它所在的位置。但是,我不能將代碼放在頁面的主體中。將JavaScript壓縮到DIV標記
這裏是代碼。我在html正文中有一個ID爲「comments」的div標籤。
<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>
<style type="text/css">
#nav {
padding: 0 0 0 10px;
margin: 0;
list-style: none;
width: 760px;
height: 0px;
background:#6E102B;
margin-bottom: 5px;
}
.twtr-hd,
.twtr-ft,
.twtr-user
{
display: none;
}
</style>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 4,
interval: 30000,
width: 250,
height: 300,
theme: {
shell: {
background: '#ffffff',
color: '#000000'
},
tweets: {
background: '#ffffff',
color: '#000000',
links: '#b80b0b'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
behavior: 'all'
}
}).render().setUser('NiagaraMoot').start();
</script>
添加更多詳細信息 –
是,更多詳情請。 – Jeff