迫使言语中断。 WooCommerce Cart页面(产品描述)
我想用某种话语设定迫使线路断裂。
现在看起来像:
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,首先,基于屏幕截图和指向的箭头,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 withword-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 tocollapse
andtable-layout
property set tofixed
on the<table>
element. Also, specify thewidth
of the<table>
. Then, set theword-wrap
property to itsbreak-word
value for<td>
elements and addborder
andwidth
to them.Source: https://www.w3docs.com/snippets/css/how-to-wrap-the-content-of-a-table-cell.html