0

使用 Bootstrap 模板 (free-responsive-template-photography)。将照片、颜色更改为我拥有和喜欢的东西。开始为照片添加弹出框以进行描述,但现在布局已从 3-4 个缩略图宽(span3 或 span4)变为垂直堆叠的所有照片。现在是 1 列,而不是 3 或 4 列。除了颜色之外,没有更改任何 CSS。我哪里出错了?有什么想法可以纠正这个布局吗?

<body>
<div class="container">
 <div class="row">
        <article class="span4">
<h2>Popover with Twitter Bootstrap</h2>
<div class="clear"></div>
<ul><img src="img/bar/tBDR-BM4.png" id="BDR-BM4" class="btn btn-success" rel="popover" data-original-title="">BDR-BM4</a>
</ul>

<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-tooltip.js"></script>
<script src="js/pbootstrap-popover.js"></script>
<script>
$(function ()
{ $("#BDR-BM4").popover({title: 'BDR-BM4', content: "Receivers are custom built using precision CNC machines, 7075 T6 aluminum,USA forgings. Must Ship to FFL Holder"});
});
</script>
<ul><img src="img/bar/tBDR-B12.png" id="BDR-B12" class="btn btn-success" rel="popover" data-original-title="">BDR-B12</a>
</ul>

<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-tooltip.js"></script>
<script src="js/pbootstrap-popover.js"></script>
<script>
$(function ()
{ $("#BDR-B12").popover({title: 'BDR-15A', content: "Receivers are custom built using precision CNC machines, 7075 T6 aluminum,USA forgings. Must Ship to FFL Holder"});
});
</script>
<ul><img src="img/bar/tBDR-B20H.png" id="BDR-B20H" class="btn btn-success" rel="popover" data-original-title="">BDR-B20H</a>
</ul>

<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-tooltip.js"></script>
<script src="js/pbootstrap-popover.js"></script>

<script>
$(function ()
{ $("#BDR-B20H").popover({title: 'BDR-B20H', content: "Receivers are custom built using precision CNC machines, 7075 T6 aluminum,USA forgings. Must Ship to FFL Holder"});
});
</script>
<ul><img src="img/bar/tBDR-B16F.png" id="BDR-B16F" class="btn btn-success" rel="popover" data-original-title="">BDR-B16F</a>
</ul>

<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-tooltip.js"></script>
<script src="js/pbootstrap-popover.js"></script>
<script>
$(function ()
{ $("#BDR-B16F").popover({title: 'BDR-B16F', content: "Receivers are custom built using precision CNC machines, 7075 T6 aluminum,USA forgings. Must Ship to FFL Holder"});
});
</script>

</body></html>
4

1 回答 1

0

您在页面上多次使用以下代码,仅将其放在页脚中一次。

 <script src="js/jquery.min.js">
 <script src="js/bootstrap-tooltip.js">
 <script src="js/pbootstrap-popover.js">

也去掉ieclear div后面的article tag

<div class="clear"></div>/*remove*/


我已经清理了你的代码并重新安排了一些东西,在你的身体中使用以下内容,看看它是否是你希望获得的结果:
Jsfiddle with the result Please check

浏览器中的结果截图

<div class="container">
<div class="row">
    <article class="span12">
         <h2>Popover with Twitter Bootstrap</h2>

       <div class="row-fluid">
        <div class="span3">
            <ul>
                <img src="http://webpages.charter.net/tfbone/img/bar/tBDR-BM4.png" id="BDR-BM4"
                class="btn btn-success" rel="popover" data-original-title="">BDR-BM4</a>
            </ul>
        </div>
        <div class="span3">
            <ul>
                <img src="http://webpages.charter.net/tfbone/img/bar/tBDR-B12.png" id="BDR-B12"
                class="btn btn-success" rel="popover" data-original-title="">BDR-B12</a>
            </ul>
        </div>
        <div class="span3">
            <ul>
                <img src="http://webpages.charter.net/tfbone/img/bar/tBDR-B20H.png" id="BDR-B20H"
                class="btn btn-success" rel="popover" data-original-title="">BDR-B20H</a>
            </ul>
</div>
<div class="span3">
    <ul>
        <img src="http://webpages.charter.net/tfbone/img/bar/tBDR-B16F.png" id="BDR-B16F"
        class="btn btn-success" rel="popover" data-original-title="">BDR-B16F</a>
    </ul>
</div>
<script>

</script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-tooltip.js"></script>
<script src="js/pbootstrap-popover.js"></script>
<script>
    $(function() {
        $("#BDR-BM4").popover({
            title: 'BDR-BM4',
            content: "Black Dawn Lower Receivers are custom built using precision CNC machines, 7075 T6 aluminum,USA forgings. Must Ship to FFL Holder"
        });
    });
    $(function() {
        $("#BDR-B12").popover({
            title: 'BDR-15A',
            content: "Black Dawn Lower Receivers are custom built using precision CNC machines, 7075 T6 aluminum,USA forgings. Must Ship to FFL Holder"
        });
    });
    $(function() {
        $("#BDR-B20H").popover({
            title: 'BDR-B20H',
            content: "Black Dawn Lower Receivers are custom built using precision CNC machines, 7075 T6 aluminum,USA forgings. Must Ship to FFL Holder"
        });
    });
    $(function() {
        $("#BDR-B16F").popover({
            title: 'BDR-B16F',
            content: "Black Dawn Lower Receivers are custom built using precision CNC machines, 7075 T6 aluminum,USA forgings. Must Ship to FFL Holder"
        });
    });
</script>
      </div>
   </article>
   </div>
  </div>
于 2013-02-21T11:56:58.277 回答