Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 使用引导4时不可移动的顶部空间_Twitter Bootstrap_Bootstrap 4 - Fatal编程技术网

Twitter bootstrap 使用引导4时不可移动的顶部空间

Twitter bootstrap 使用引导4时不可移动的顶部空间,twitter-bootstrap,bootstrap-4,Twitter Bootstrap,Bootstrap 4,在这种情况下,我无法找到一种方法来消除左栏和浏览器窗口顶部的空间。我尝试过手动或使用.mt-0和.pt-0类将所有顶部填充和边距设置为0,但到目前为止没有效果 我认为代码相对简单(如下所示),如果有人能指出问题所在,我将不胜感激 <body>  <div> <div class="row"> <div class="col-4 bg-light">

在这种情况下,我无法找到一种方法来消除左栏和浏览器窗口顶部的空间。我尝试过手动或使用
.mt-0
.pt-0
类将所有顶部填充和边距设置为0,但到目前为止没有效果

我认为代码相对简单(如下所示),如果有人能指出问题所在,我将不胜感激

<body> 
    <div>
        <div class="row">
            <div class="col-4 bg-light">
                left column
            </div>
            <div class="col-8">
                right column
            </div> <!-- End right column -->
        </div>  <!-- End row -->
    </div> <!-- End container -->
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>

</body>
 
左列
右栏

我不知道为什么,但如果您重新键入
标签,它似乎工作正常。可能字符没有被识别?

谢谢。在阅读您的建议后,我查看了我的代码,并在
标记后面找到了一个尾随空格。重新键入
或删除空格字符都可以成功解决此问题。