Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.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
Html 如何使用引导打印无水平滚动条的包装文本?_Html_Css_Twitter Bootstrap_Bootstrap 4_Blazor - Fatal编程技术网

Html 如何使用引导打印无水平滚动条的包装文本?

Html 如何使用引导打印无水平滚动条的包装文本?,html,css,twitter-bootstrap,bootstrap-4,blazor,Html,Css,Twitter Bootstrap,Bootstrap 4,Blazor,我的问题很简单。我想在没有水平滚动条的web浏览器上显示所有内容 <div class="container"> <div class="row h-100" style="overflow-y:scroll; padding-left:17px; padding-right:17px"> @for(int i=0;i<100;i++) { &

我的问题很简单。我想在没有水平滚动条的web浏览器上显示所有内容

<div class="container">
    <div class="row h-100" style="overflow-y:scroll; padding-left:17px; padding-right:17px">
        @for(int i=0;i<100;i++)
        {
            <div class="row flex-nowrap">
                <div class="col">
                    <div class="row">
                        https://www.whitebyte.info/programming/css/how-to-make-a-div-take-the-remaining-height
                        TESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTE
                    </div>
                    <div class="row">
                        sfdfsfdsdfdf
                    </div>
                </div>
                <div class="col-auto">
                    TEST Container
                    asddasdsaasdda
                </div>
            </div>
        }
    </div>
</div>


@对于(int i=0;i您使用的行和列太多。请尝试在页面的CSS部分中设置边框大小:边框框和边距:0;。根据我的说明,每一行都使用一些默认的边距填充。在行中使用“无槽”。

您需要打断word(使用
word break
规则)避免水平滚动。默认情况下,没有空格的长单词不会打断/换行到下一行。请参见下面的示例

因为您已经在使用引导,所以可以避免下面的自定义类,而使用引导类
text break
(),而不是示例中的自定义类

我做了两个改变

  • 添加了一个新类
  • 删除了类
    ,在您的情况下不需要它。您可以拥有它,但应该有一个子
    col
    col-*
。断开单词{
单词break:打破一切;
}

https://www.whitebyte.info/programming/css/how-to-make-a-div-take-the-remaining-height
测试测试
SFDFSFDFSDF
测试容器
AsddasSaasdda

@kiranvj谢谢你的回答。我申请了,但不起作用。@TaehyungKim你也可以使用引导类
文本中断
,因为我在答案中更新了它