javascript - Google Feed Control - 使用 CSS 设置样式

标签 javascript html css rss google-feed-api

我正在使用 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-resultsRootgfc-resultsHeadergfc-titlegfc-resultsgfc-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/

相关文章:

html - 使边框变粗并改变颜色或在 awesome-bootstrap-checkbox 上产生阴影效果?

html - 可伸缩页眉和页脚的语义标记

css - Bootstrap 导航透明

javascript - 如何将 Javascript 变量传递给 Rails Controller?

javascript - Backbone js 帮助我获取 JSON 数组

javascript - 使用数组 Javascript 制作幻灯片

jquery - 当鼠标悬停在菜单项上时,超链接会移动。

javascript - 为什么将 InnerHTML 替换为 innerText 会导致性能下降 >15 倍

javascript - 使用 JavaScript 从外部文件读取 CSS?

javascript - p5 调整 Canvas 大小问题; resizeCanvas 未定义