我有这行HTML
:
null
<div style=''line-height: 0.75em;min-height: 0.75em;''> </div>
null
结果是一条与文档中所有其他行高度相同的行。
我如何修改这个代码,使空白行是所有其他行高度的75%?
您应该删除其中一组单引号。
这个:
<div style=''line-height: 0.75em;min-height: 0.75em;''> </div>
应该是:
<div style='line-height: 0.75em;min-height: 0.75em;'> </div>
null
<div>Sample line 1</div>
<div style='line-height: 0.5em;min-height: 0.5em;'> </div>
<div>Sample line 2</div>
<!-- change the line-height and min-height values to see the blank line height change. -->
<!-- Also use 2 sets of single quotes to see that this results in the style attributes being ignored. -->