如何在 Vuetify.js 中使文本换行到下一行

5 html vuetify.js

我正在尝试将一大块文本添加到 HTML 元素,但文本都保持一行,离开屏幕的右侧,而不是换行到多行。不确定这是常规的 HTML/CSS 问题还是 Vuetify 问题。

<v-flex>
    <v-card>
        <v-container>
            <p>
                 {{ stringToDisplay }}
            </p>
        <v-container>
    </v-card>
</v-flex>
Run Code Online (Sandbox Code Playgroud)

Pra*_*ham 7

您可以使用text-wrap/text-no-wrap类。
像下面这样:

<v-flex>
    <v-card>
        <v-container>
            <p class="text-wrap">
                 {{ stringToDisplay }}
            </p>
        <v-container>
    </v-card>
</v-flex>
Run Code Online (Sandbox Code Playgroud)


Pwn*_*tic 6

我的场景的解决方案是添加word-break: break-word;到我的班级中。内置的类名没有满足我的需要。