我正在使用 Google Dynamic Feed Control 整理一小部分 RSS 提要。
但是我只是想知道是否有任何文档来解释我如何设计它。据我所知,它使用自己的预设样式,例如.gfc-title {} , .gfc-resultsHeader {} 这是我所知道的仅有的两个。
我只有四个提要,我真的很想将它们组织成一个并排的垂直列。而不是默认堆叠,左对齐在彼此之上。
如果我在这里遗漏了一些明显的东西,我深表歉意!
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("feeds", "1");
function OnLoad() {
// Create a feed control
var feedControl = new google.feeds.FeedControl();
// Add two feeds.
feedControl.addFeed("#", "Feed 1");
feedControl.addFeed("#", "Feed 2");
feedControl.addFeed("#", "Feed 3");
feedControl.addFeed("#, "Feed 4");
// Draw it.
feedControl.draw(document.getElementById("google_feeds"));
}
google.setOnLoadCallback(OnLoad);
最佳答案
您可以使用 developer tools of your browser找出 Google 的提要控件的 css 类。我想最重要的是 gfc-resultsRoot、gfc-resultsHeader、gfc-title、gfc-results和 gfc-result。
您可能通过向gfc-resultsRoot 添加样式来获得您想要的结果。也许是这样的:http://jsfiddle.net/qy81yn7f/1/
.gfc-resultsRoot {
width : 300px;
float: left;
}
关于javascript - Google Feed Control - 使用 CSS 设置样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25959239/