Bootstrap网格覆盖缩放

时间:2016-08-03 15:15:33

标签: html css twitter-bootstrap twitter-bootstrap-3

我使用bootstrap和jquery导入以下代码,并且网格系统在我的屏幕上正常工作。但是,当我尝试放大或在较小的屏幕中按钮重叠时:

overlay zoom

我想要的是:

较小屏幕中较小的组件(包括较小的文本等),没有任何叠加。

放大区域只看到一些没有叠加的组件。

我试过了#34;容器"和" contanier-fluid"以及不同的元标题没有成功。有没有办法只使用bootstrap?



<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="stylesheet" href="dist/css/bootstrap.min.css">
    </head>
    
    <body ng-app="angularapp-example">
        <div class="container-fluid">
            <div class="row">
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 1</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 2</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 3</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 4</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 5</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 6</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 7</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 8</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 9</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 10</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 11</a>
                </div>
                <div class="col-xs-1 col-sm-1 col-md-1">
                    <a href="#" class="btn btn-info">Buton 12</a>
                </div>
            </div>
        </div>
        <!-- Jquery and Bootstrap -->
        <script src="dist/js/jquery.js"></script>
        <script src="dist/js/bootstrap.min.js"></script>
    </body>
</html>
&#13;
&#13;
&#13;

非常感谢你。

1 个答案:

答案 0 :(得分:1)

col-md-1类直接添加到a元素:

         <div class="container">
            <div class="row">
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 1</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 2</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 3</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 4</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 5</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 6</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 7</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 8</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 9</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 10</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 11</a>
                    <a href="#" class="col-md-1 col-sm-1 col-xs-1 btn btn-info">Buton 12</a>
            </div>
        </div>

这是一个小提琴:https://jsfiddle.net/o5qkq9f7/1/