简体   繁体   English

在HTML页面,Twitter Bootstrap中添加弹出窗口数据内容

[英]Adding popover data-content inside HTML page, Twitter Bootstrap

I use Twitter Bootstrap 2.0.1. 我使用Twitter Bootstrap 2.0.1。 I have such a button: 我有这样一个按钮:

<a class="btn btn-info" rel="popover"
  title="today 12:11"
  data-content="I'm the content of the button 1 heyoo">Last text</a>
<a class="btn btn-info" rel="popover"
  title="yesterday 10:20"
  data-content="I'm the content of the button 2 heyoo">Last text</a>

But when I use this code, search engines doesn't take "data-content" into account. 但是,当我使用此代码时,搜索引擎不会考虑“数据内容”。 But I want "data-content" to be seen by spiders. 但是我希望蜘蛛能够看到“数据内容”。

If I make this, button becomes to big: 如果我这样做,按钮会变大:

<a class="btn btn-info" rel="popover"
  title="today 12:11">I'm the content of the button 1 heyoo</a>

This is also alternative, but creates duplicate data: 这也是替代方法,但是会创建重复数据:

<a class="btn btn-info" rel="popover"
  title="today 12:11"
  data-content="I'm the content of the button 1 heyoo">
  Last text
 <div style="display: none;">
 <span>I'm the content of the button 1 heyoo</span>
 </div>
</a>

Another alternative is putting "data-content" into page but writing it with font 1 point. 另一种选择是将“数据内容”放入页面中,但以1点字体书写。 But I don't think that's a good idea. 但是我认为这不是一个好主意。

But when I use this code, search engines doesn't take "data-content" into account. 但是,当我使用此代码时,搜索引擎不会考虑“数据内容”。

Why should they? 为什么要这样?

What would be the benefit of a search engine directing me to your site, when the text “I'm the content of the button 1 heyoo” that I searched for is not displayed in a readable fashion to me on that page? 当我搜索的文本“我是按钮1 heyoo的内容”没有以可读的方式显示在该页面上时,将我定向到您的网站的搜索引擎有什么好处?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM