迫使言语中断。 WooCommerce Cart页面(产品描述)

发布于 2025-01-31 11:26:58 字数 632 浏览 4 评论 0原文

我想用某种话语设定迫使线路断裂。

现在看起来像:

Langgymnasium,Schulbegleitend,09:00- 11:15,03.09,10.09,17.09,24,09,09,01.10,29.10,05.11,12.11,11,11,26.11,26.11,03.12,10.12,10.12,17.12,14.01,21.01,21.01,28.01,28.01,28.01,04.042,04.042,04.02 × 18

And i want it like that:

Langgymnasium, schulbegleitend

09:00 - 11:15

03.09, 10.09, 17.09, 24, 09, 01.10, 29.10, 05.11、12.11、19.11、26.11、03.12、10.12、17.12、14.01、21.01、28.01、04.02

我如何解决这个问题?

非常感谢!

“

I want to set force a line break in some words.

It looks like that now:

Langgymnasium, schulbegleitend, 09:00 -
11:15, 03.09, 10.09, 17.09, 24, 09, 01.10, 29.10, 05.11, 12.11, 19.11, 26.11, 03.12, 10.12, 17.12, 14.01, 21.01, 28.01, 04.02
× 18

And i want it like that:

Langgymnasium, schulbegleitend

09:00 - 11:15

03.09, 10.09, 17.09, 24, 09, 01.10, 29.10, 05.11, 12.11, 19.11, 26.11, 03.12, 10.12, 17.12, 14.01, 21.01, 28.01, 04.02

How can I resolve that ?

Thank You very much!

Woocommerce page

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风铃鹿 2025-02-07 11:26:58

因此,首先,基于屏幕截图和指向的箭头,a < table元素的行为将与大多数其他HTML元素不同。

因此,您很可能必须将.product-name的内部文本与其他一些HTML元素(例如< div>< span> 也许,然后使用Word-Break的CSS。

一方面,您可以尝试尝试更改CSS:

使用CSS Word-wrap属性的解决方案

中的table-layout属性,请使用border-collapse设置为<<代码> collapse 和table-layout属性设置为 上的&lt; table>&gt;元素。另外,指定&lt; table>&gt;width。然后,将Word-wrap将属性设置为break-word &lt; td&gt;元素的值,并添加border> border> border宽度给它们。

来源: https> https: //www.w3docs.com/snippets/css/how-to-wrap-the-content-of-a-table-cell.html

So first, based off the screen shot and the arrows you have pointing, a <table> element will behave differently than most other HTML elements.

So you most likely will have to wrap the inner text of .product-name with some other HTML element like <div> or <span> maybe, and then use the CSS you have with word-break.

A side from that, you can potentially try changing the table-layout property in the CSS:

Solution with the CSS word-wrap property

Use the border-collapse property set to collapse and table-layout property set to fixed on the <table> element. Also, specify the width of the <table>. Then, set the word-wrap property to its break-word value for <td> elements and add border and width to them.

Source: https://www.w3docs.com/snippets/css/how-to-wrap-the-content-of-a-table-cell.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文