我正在尝试使用twitter bootstrap进行编码 并且我的代码无效,请查看我编码的崩溃:
<div itemscope itemtype="http://schema.org/SoftwareApplication">
<span itemprop="name">Angry Birds</span> -
REQUIRES <span itemprop="operatingSystem">ANDROID</span>
<link itemprop="applicationCategory" href="http://schema.org/GameApplication"/>
RATING:
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">4.6</span> (
<span itemprop="ratingCount">8864</span> ratings )
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
Price: $<span itemprop="price">1.00</span>
<meta itemprop="priceCurrency" content="USD" />
</div>
</div>
我已经读过,我需要将我的代码添加到Jquery,但我仍然没有工作,有人可以告诉我出了什么问题吗?
答案 0 :(得分:0)
使用相同的代码,这是一个适合您的小提琴:https://jsfiddle.net/yellen/x4zfwxsh/
这是您更新的手风琴代码:
<div class="col-md-12">
<h2>Accordian</h2>
<div class="panel-group" id="accordian" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading1">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordian" href="#section1" aria-expanded="true" aria-controls="section1"> Q1</a>
</h4>
</div>
<!-- id="#section1" needs to be updated to id="section1"-->
<div class="panel-collapse collapse in" id="section1" role="tabpanel" aria-labelledby="heading1">
<div class="panel-body">this will contain text</div>
</div>
</div>
</div>
</div>
您还应该了解超链接中的#
指定要滚动的html元素ID。
如果href="#section1"
,则您的元素ID应为<div id="section1">
答案 1 :(得分:0)
您的div标签ID声明似乎有误报 - 它有#符号。在你的情况下:
而不是<div class="panel-collapse collapse in" id="#section1">
应该是<div class="panel-collapse collapse in" id="section1">