gpt4 book ai didi

html - 如何在 HTML 中重复一个字符?

转载 作者:太空宇宙 更新时间:2023-11-04 15:17:48 25 4
gpt4 key购买 nike

有没有办法在 HTML(不是 HTML5!)的表格单元格内重复打印字符?

*(仅使用 HTML 或仅使用 HTML 和 CSS)

** 需要打印“.”通过细胞的全长。不知道单元格的确切宽度!

最佳答案

好的,在您详细说明您的问题后,我就有了解决方案。带有虚线底部边框和顶部白色背景文本的 div。

例子:

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>​

http://jsfiddle.net/bKuVe/

关于html - 如何在 HTML 中重复一个字符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13153944/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com