相关疑难解决方法(0)

多行flexbox中的换行符

有没有办法在多行flexbox中进行换行?

例如,在此笔中的每个第3项之后中断

.container {
  background: tomato;
  display: flex;
  flex-flow: row wrap;
  align-content: space-between;
  justify-content: space-between;
}
.item {
  width: 100px;
  height: 100px;
  background: gold;
  border: 1px solid black;
  font-size: 30px;
  line-height: 100px;
  text-align: center;
  margin: 10px;
}
.item:nth-child(3n) {
  background: silver;
}
Run Code Online (Sandbox Code Playgroud)
<div class="container">
  <div class="item">1</div>
  <div class="item">2</div>
  <div class="item">3</div>
  <div class="item">4</div>
  <div class="item">5</div>
  <div class="item">6</div>
  <div class="item">7</div>
  <div class="item">8</div>
  <div class="item">9</div>
  <div class="item">10</div>
</div>
Run Code Online (Sandbox Code Playgroud)

喜欢

.item:nth-child(3n){
  /* line-break: after; */    
}
Run Code Online (Sandbox Code Playgroud)

html css flexbox

202
推荐指数
7
解决办法
22万
查看次数

使用:before和:在CSS选择器之后插入Html

我想知道以下是否可行.我知道它不起作用,但也许我不是用正确的语法编写它.

li.first div.se_bizImg:before{
    content: "<h1>6 Businesses Found <span class="headingDetail">(view all)</span></h1>";
}
Run Code Online (Sandbox Code Playgroud)

无论如何这样做?

html css css-selectors

188
推荐指数
1
解决办法
20万
查看次数

div中文本中的新行

在textarea中,有新的行使用例如&#013;,但是如何在不使用htmll(纯文本,如\n)的情况下对div元素执行此操作?

html css

27
推荐指数
1
解决办法
5万
查看次数

没有<br>标签的新行

写这个HTML:

lorem ipsum
lorem ipsum
lorem ipsum
Run Code Online (Sandbox Code Playgroud)

浏览器显示:

lorem ipsumlorem ipsumlorem ipsum
Run Code Online (Sandbox Code Playgroud)

有没有办法看到这个:

lorem ipsum
lorem ipsum
lorem ipsum
Run Code Online (Sandbox Code Playgroud)

不使用<br>每行末尾的标记,也不使用textarea.

我需要这个,因为我的文本有100.000短行,写<br>标记100.000次是很费时间的.

html

16
推荐指数
3
解决办法
3万
查看次数

使用纯CSS的内联<div>列元素

我有一个类似于表的结构,其中列表示逻辑实体.对于我的用例,它是需要在视觉上分组的表,最好是通过内联流动.

示例源片段:

<div>
  <div id="entity1" class="entities">
    <div>Ab</div>
    <div>Cdefg</div>
  </div>
  <div id="entity2" class="entities">
    <div>98224</div>
    <div>511</div>
  </div>
  <div id="entity3" class="entities">
    <div>????</div>
    <div>?</div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

所需的布局:

+----+-------+------+
| Ab | 98224 | ???? |
+----+--+----++---+-+
| Cdefg | 511 | ? |
+-------+-----+---+
Run Code Online (Sandbox Code Playgroud)

当然,很容易在服务器端转换文档纯粹是为了演示,但我想知道我是否可以保持文档层次结构并在(CSS)表示层上进行转换.它可能吗?

html css dom

6
推荐指数
1
解决办法
630
查看次数

如何在闪亮中方便地添加多个换行符?

我想在我闪亮的应用程序中放置多个换行符。代替

br(),
br(),
br(),
...
Run Code Online (Sandbox Code Playgroud)

有没有更方便的方法?谢谢。

html r line-breaks shiny

6
推荐指数
1
解决办法
3713
查看次数

向Literal控件添加换行符

我有一些ASP.NET Literal控件的问题,因为它没有呈现<br/>标记.

string strTemp = task.Description.ToString();
lit_description.Text = strTemp.Replace("\r\n", "<br/>");
Run Code Online (Sandbox Code Playgroud)

输出:

LG SERVICE TICKET<br/><br/> <br/><br/>- DATE IN (eg. Feb 11, 2011):<br/><br/>- DATE OUT (eg. Feb 11, 2011):<br/><br/>- Client Has Critical Data (fees will apply):<br/><br/>- Windows Password: <br/><br/>- Accessories:<br/><br/><br/><br/><br/>Client Complaint:<br/><br/><br/><br/>
Run Code Online (Sandbox Code Playgroud)

c# asp.net webforms

5
推荐指数
1
解决办法
5042
查看次数

我可以使用CSS在特殊字符处换行吗?

例如,我有一行:“特殊字符中断;字符串中断;示例中断”。我想打破有关“;”的界限 使用CSS。

是否有任何可能的方法可以这样做。请建议

css

5
推荐指数
1
解决办法
5107
查看次数

如何在CSS中的一定宽度后换行

我正在设计一个聊天用户界面。

在我的聊天气泡中,当我输入很多字符时,它就会超出气泡。

有没有CSS技术可以在一定宽度后换行?

html css

3
推荐指数
1
解决办法
5835
查看次数

在 C# 中用 &lt;br/&gt; 替换 \n

我在将 \n 转换为 < br/> 时遇到问题。我要转换的文本是test\ntest\n\ntest 我希望它像test<br />test<br /><br />test. 所以每个 \n 都需要替换为<br />.

现在我正在使用此代码:

Regex regex = new Regex(@"(\n)+");
string ticketCategorieOmschrijving = regex.Replace("test\ntest\n\ntest", "<br />");
Run Code Online (Sandbox Code Playgroud)

但是此代码替换\n\n为单个<br />,而它需要<br /><br />

有人可以帮忙吗?

html c#

1
推荐指数
1
解决办法
232
查看次数

使用CSS创建新行或换行符

我有一堆单选按钮和标签如下:

<input type="radio" id="FID3626" name="Discipline" value="Yes" class="" title="" data-test="test">
<label for="">Yes </label>

<input type="radio" id="FID3626" name="Discipline" value="No" class="" title="" data-test="test">
<label for="">No </label>

<input type="radio" id="FID3626" name="Discipline" value="May be" class="" title="" data-test="test">
<label for="">May be </label>

<input type="radio" id="FID3626" name="Discipline" value="Option A" class="" title="" data-test="test">
<label for="">Option A </label>

<input type="radio" id="FID3626" name="Discipline" value="Option B" class="" title="" data-test="test">
<label for="">Option B </label>

<input type="radio" id="FID3626" name="Discipline" value="Option C" class="" title="" data-test="test">
<label for="">Option C </label>

<input type="radio" id="FID3626" name="Discipline" value="Option …
Run Code Online (Sandbox Code Playgroud)

css css3

0
推荐指数
1
解决办法
1005
查看次数

Split a text into two lines

Is there a way to force a part of a text to display on a new line with CSS?

So when the HTML looks like this:

<p>Hello, my name is John.</p>
Run Code Online (Sandbox Code Playgroud)

The result will be:

Hello,

my name is John.

The HTML is generated dynamically, so I cannot change it.

css

0
推荐指数
1
解决办法
2万
查看次数

html css 返回行?

我有来自服务器的 JSON 响应,在此数据中,我在文本中有一个“返回行”。

{text: "I am in the first line ? and I am in the second line"}
Run Code Online (Sandbox Code Playgroud)

但是当我在 html 中显示它时,没有显示“返回行”。

"I am in the first line and I am in the second line"
Run Code Online (Sandbox Code Playgroud)

代替:

I am in the first line
and I am in the second line
Run Code Online (Sandbox Code Playgroud)

任何使用 HTML 或 CSS(可能是 JavaScript)的解决方案?

谢谢 !

html javascript css

-4
推荐指数
1
解决办法
1239
查看次数

标签 统计

css ×9

html ×9

c# ×2

asp.net ×1

css-selectors ×1

css3 ×1

dom ×1

flexbox ×1

javascript ×1

line-breaks ×1

r ×1

shiny ×1

webforms ×1