textarea 的多行插件
Multi-line add-on for textarea
我正在使用 bootstrap 4 输入组,并使用附加组件附加或假装我的输入作为标签。
对于输入,它看起来不错。现在我需要一个多行附加组件或文本区域标签。
我正在 Bootstrap 或 CSS.
中寻找最佳解决方案
这是我正在尝试的代码。
<style>
.h-unset {
height: unset !important;
}
.multiline-label {
display: inline-block;
word-wrap: break-word;
word-break: break-word;
width: 100%;
}
</style>
<div class="input-group input-group-sm mb-3 row mx-0">
<div class="input-group-prepend col-md-3 px-0">
<label for="naastVastgoedbeleg-ging"
class="input-group-text w-100 rounded-0 multiline-label h-unset"
id="label-naastVastgoedbeleg-ging">
<strong>Werkzaamheden naast vastgoedbeleg-ging (bijv. loondienst of onderneming)</strong>
</label>
</div>
<textarea id="naastVastgoedbeleg-ging"
class="form-control rounded-0 col-md-9 h-unset"
aria-label="naastVastgoedbeleg-ging"
aria-describedby="label-naastVastgoedbeleg-ging">
</textarea>
</div>
感谢帮助快乐编码!
它通过使用这个 css
.multiline-label strong {
white-space: pre-wrap;
}
我正在使用 bootstrap 4 输入组,并使用附加组件附加或假装我的输入作为标签。 对于输入,它看起来不错。现在我需要一个多行附加组件或文本区域标签。 我正在 Bootstrap 或 CSS.
中寻找最佳解决方案这是我正在尝试的代码。
<style>
.h-unset {
height: unset !important;
}
.multiline-label {
display: inline-block;
word-wrap: break-word;
word-break: break-word;
width: 100%;
}
</style>
<div class="input-group input-group-sm mb-3 row mx-0">
<div class="input-group-prepend col-md-3 px-0">
<label for="naastVastgoedbeleg-ging"
class="input-group-text w-100 rounded-0 multiline-label h-unset"
id="label-naastVastgoedbeleg-ging">
<strong>Werkzaamheden naast vastgoedbeleg-ging (bijv. loondienst of onderneming)</strong>
</label>
</div>
<textarea id="naastVastgoedbeleg-ging"
class="form-control rounded-0 col-md-9 h-unset"
aria-label="naastVastgoedbeleg-ging"
aria-describedby="label-naastVastgoedbeleg-ging">
</textarea>
</div>
感谢帮助快乐编码!
它通过使用这个 css
.multiline-label strong {
white-space: pre-wrap;
}