跳至内容

BTEC IT 单元 20 - 网站设计/HTML/嵌入式 Twitter Feed

来自 Wikibooks,开放世界的开放书籍

Twitter 按钮

<head>
<style>

a.twitter-timeline {
  /* Make the link look like a button */
  display: inline-block;
  padding: 6px 12px 6px 30px;
  margin: 10px 0;
  border: #ccc solid 1px;
  border-radius: 3px;
  background: #f8f8f8 url("https://upload.wikimedia.org/wikipedia/en/thumb/9/9f/Twitter_bird_logo_2012.svg/944px-Twitter_bird_logo_2012.svg.png") 8px 8px no-repeat;
  background-size: 1em 1em;

  /* Text */
  font: normal 12px/18px Helvetica, Arial, sans-serif;
  color: #333;
  white-space: nowrap;
}
  /* Hover effect */
a.twitter-timeline:hover,
a.twitter-timeline:focus {
  background-color: #dedede;
}

/* Color Highlight for keyboard navigation */

a.twitter-timeline:focus {
  outline: none;
  border-color: #0089cb;
}
</style>
</head>

<body>
<!-- change the https://twitter.com/NUS_USI with your own URL -->
<a class="twitter-timeline" href="https://twitter.com/NUS_USI">Tweets by NUS_USI</a>
<br>

</body>


Twitter 时间线

<head>
</head>

<body>
<!-- change the https://twitter.com/WokingComputing with your own URL -->
<a class="twitter-timeline" data-width="220" data-height="500" href="https://twitter.com/WokingComputing">Tweets by WokingComputing</a>
<script>
!function(d,s,id)
{
	var js,fjs=d.getElementsByTagName(s)[0],
	p=/^http:/.test(d.location)?'http':'https';
		if(!d.getElementById(id))
		{
			js=d.createElement(s);
			js.id=id;js.src=p+"://platform.twitter.com/widgets.js";
			fjs.parentNode.insertBefore(js,fjs);
		}
}

(document,"script","twitter-wjs");

</script>
</body>
华夏公益教科书