[英]How can I increase space between lines within the text shown in the ASP.NET label?
我在ASP.NET
C#
應用程序中有一個label
。
在runtime
,將使用文本populated
ASP.NET label
值。
在ASPX文件中,我們具有以下代碼:
<asp:Label ID="commentLabelForGridView" runat="server"
Style="text-align:left;" font-size="1.75em" ></asp:Label>
在隱藏代碼的CS文件中,我們有以下代碼:
commentLabelForGridView.Text = "BlahBlahBlah........Blah...................";
當ASP標簽中有很多text
,在頁面上呈現的text
將變為Multilined
。
問題在於,行之間沒有足夠的空間,因此難以閱讀,因為它看起來很擁擠。
如何在ASP.NET標簽中顯示的文本內的行之間增加空格?
在樣式中添加行高屬性...
<asp:Label ID="commentLabelForGridView" runat="server"
Style="text-align:left; line-height:1.5px" font-size="1.75em" ></asp:Label>
...可以是:line-height:1.5px或line-height:100%
希望能幫助到你..
感謝@ user2025312提到修改line-height屬性應該有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.