如何重复HTML中的字符? [英] How to repeat a character in HTML?
本文介绍了如何重复HTML中的字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
*(仅使用HTML或使用HTML和CSS ONLY)
有什么方法可以在HTML表单中反复打印字符(不是HTML5!)? )
**需要打印。通过细胞的全长。不知道单元格的确切宽度!
解决方案
确定你的问题后,我有解决方案。
带有底部虚线边框的文本以及顶部带有白色背景的文本。
示例:
CSS:
.line {
border-bottom:1px虚线黑色;
职位:亲属;
height:16px;
}
.line span {
display:inline-block;
职位:亲属;
背景:白色;
bottom:-2px;
身高:100%;
padding:0 5px;
}
.line .price {
position:absolute;
right:0;
HTML:
< div class =line>
< span class =title>名称< / span>
< span class =price> 123.23 $< / span>
< / div>
< div class =line>
< span class =title>名称< / span>
< span class =price> 123.23 $< / span>
< / div>
Is there any way to repeatedly print a character inside a table cell in HTML (NOT HTML5!)?
*(only using HTML OR using HTML and CSS ONLY)
** Need to print "." through the full length of a cell. Don't know the exact width of the cell!
解决方案
Ok after u elaborated your question I have the solution. A div with a dotted bottom border and text with a white background on top.
example :
CSS:
.line{
border-bottom:1px dotted black;
position:relative;
height:16px;
}
.line span{
display:inline-block;
position:relative;
background:white;
bottom:-2px;
height:100%;
padding:0 5px;
}
.line .price{
position:absolute;
right:0;
}
HTML:
<div class="line">
<span class="title">name</span>
<span class="price">123.23$</span>
</div>
<div class="line">
<span class="title">name</span>
<span class="price">123.23$</span>
</div>
这篇关于如何重复HTML中的字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文