有没有办法在多行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) 我想知道以下是否可行.我知道它不起作用,但也许我不是用正确的语法编写它.
li.first div.se_bizImg:before{
content: "<h1>6 Businesses Found <span class="headingDetail">(view all)</span></h1>";
}
Run Code Online (Sandbox Code Playgroud)
无论如何这样做?
在textarea中,有新的行使用例如
,但是如何在不使用htmll(纯文本,如\n)的情况下对div元素执行此操作?
写这个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次是很费时间的.
我有一个类似于表的结构,其中列表示逻辑实体.对于我的用例,它是需要在视觉上分组的表行,最好是通过内联流动.
示例源片段:
<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)表示层上进行转换.它可能吗?
我有一些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) 例如,我有一行:“特殊字符中断;字符串中断;示例中断”。我想打破有关“;”的界限 使用CSS。
是否有任何可能的方法可以这样做。请建议
我正在设计一个聊天用户界面。
在我的聊天气泡中,当我输入很多字符时,它就会超出气泡。
有没有CSS技术可以在一定宽度后换行?
我在将 \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 />
有人可以帮忙吗?
我有一堆单选按钮和标签如下:
<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) 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.
我有来自服务器的 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)的解决方案?
谢谢 !