提问人:Stackoverflow 提问时间:7/12/2017 最后编辑:Chris HappyStackoverflow 更新时间:7/12/2017 访问量:1705
用点填充空白区域
Fill in empty space with dots
问:
我试图得到与这个问题相同的结果,但无法做到。我会添加评论,但我没有足够的声誉。
这是我当前的代码。
dl {
width: 400px
}
dt {
float: left;
width: 300px;
overflow: hidden;
white-space: nowrap
}
dd {
float: left;
width: 100px;
overflow: hidden
}
dt:after {
content: " .................................................................................."
}
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es">
<dl>
<dt>Drug 1</dt>
<dd>10ml</dd>
<dt>Another drug</dt>
<dd>50ml</dd>
<dt>Third</dt>
<dd>100ml</dd>
</dl>
</html>
当我尝试HTML5时,它根本不起作用!<!DOCTYPE html><html>
什么代码适用于以下内容?DOCTYPE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
答:
5赞
Chris Happy
7/12/2017
#1
您需要:
- 用
dl
- 添加 CSS
dd { margin: 0 }
dd { margin: 0 }
dl {
width: 400px
}
dt {
float: left;
width: 300px;
overflow: hidden;
white-space: nowrap
}
dd {
float: left;
width: 100px;
overflow: hidden
}
dt:after {
content: " .................................................................................."
}
<dl>
<dt>Drug 1</dt>
<dd>10ml</dd>
</dl>
<dl>
<dt>Another drug</dt>
<dd>50ml</dd>
</dl>
<dl>
<dt>Third</dt>
<dd>100ml</dd>
</dl>
评论
0赞
Stackoverflow
7/12/2017
天啊!。。。现在,当我尝试使用DOMPDF创建页面INDEX时,这失败了:'(有什么想法吗?
0赞
Chris Happy
5/29/2020
对不起@Stackoverflow直到现在我才看到您的消息。你能解决它吗?
0赞
Stackoverflow
5/29/2020
谢谢你的有趣,那是大学的工作,我现在离开...... :-)是否可以联系 StackOverflow.com 中的用户(电子邮件、PM)?
0赞
Chris Happy
5/30/2020
@Stackoverflow您可以创建聊天室: chat.stackoverflow.com/rooms/new
评论