英文:
Removing blank line in-between two bulletin values
问题
我正在获取HTML值以在UI上显示。但是在两个项目之间,我得到了空行。
<ul>
<li>Coffee</li>
<li>Tea</li>
</ul>
这将显示以下值:
• Coffee
• Tea
但是我的期望是:
• Coffee
• Tea
是否有任何方法可以在HTML标签中满足我的期望,而不是使用CSS?
英文:
I'm getting the html values to get display on UI. But I'm getting the blank line in-between two bulletins values.
<ul><li>Coffee</li><li>Tea</li></ul>
This will display values as below
•Coffee
•Tea
But my expectations would be
•Coffee
•Tea
Is there any way to met my expectations in html tags instead of using CSS?
答案1
得分: 1
我也查看了代码,但我没有遇到与你相同的问题,两个值之间没有出现空白行。
<ul><li>Coffee</li><li>Tea</li></ul>
•Coffee
•Tea
你是否设置了其他CSS样式导致出现空白行?
英文:
I also ran through the code but I didn't have the same problem as you, a blank line does not appear between the two values
<ul><li>Coffee</li><li>Tea</li></ul>
>•Coffee<br>
>•Tea
Did you set some other css style that caused it to produce blank lines?
答案2
得分: 0
请检查您的代码,以确定是否对此内容应用了一些默认的CSS样式。默认情况下,这不应该发生。
要确认,请查看文档。
英文:
Please check your code to know if you are applying some default CSS styling to this content. By default, this should not be happening.
For confirmation just check the documentation
答案3
得分: -2
- Coffee
- Tea
英文:
For my knowledge, pure html cannot achieve that, but how about inline style?
<ul><li>Coffee</li><li style="margin-top:0;">Tea</li></ul>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论