我正在使用asp.net,我有以下数据:
禁止用户发布或传播任何非法,威胁,诽谤,诽谤,淫秽,诽谤,煽动性,辱骂,仇恨,色情或亵渎的内容,或任何可构成或鼓励被视为犯罪行为的材料犯罪,引起民事责任或以其他方式违反任何法律。如果您违反本协议的任何条款,我们保留自行决定终止,暂停或限制您访问本网站的权利,无需另行通知。此外,如果被要求这样做,您同意不会尝试访问本网站。对于任何违反本协议的行为,我们还保留法律或衡平法的任何和所有补救措施。您同意自费赔偿,捍卫和控制公司(及其子公司,附属公司,高级职员,董事,代理人,员工和提供内容的第三方)对任何索赔或要求以及与此相关的所有损失的损害。使用本网站。
我们为媒体上的搜索服务使用各种信息,文本,照片,设计,图形,图像,声音和视频录制,动画,内容,广告和其他材料和效果(统称为“材料”)。我们仅通过媒体为您的个人和非商业用途提供材料。
我试过了,但结果是文字左对齐。我想证明文本的合理性。是否有任何属性可以使用css来证明asp.net中的文本?请帮忙。
答案 0 :(得分:1)
如果您使用 div
或 p
标记,请使用inline style
,如图所示
<div style="text-align:justify;">Users are prohibited from posting or transmitting any unlawful, threatening,libelous, defamatory, obscene, scandalous, inflammatory, abusive, hateful, pornographic, or profane material, or any material that could constitute or encourage conduct that would be considered a criminal offense, give rise to civil liability, or otherwise violate any law. We reserve the right, in our sole and absolute discretion, to terminate, suspend or restrict your access to this Site, unilaterally and without notice, in the event you violate any of the terms of this Agreement. In addition, if asked to do so, you agree that you will not attempt to access this Site. We also reserve any and all remedies at law or equity in connection with any violation of this Agreement. You agree, at your own expense, to indemnify, defend and hold the Company (and its subsidiaries, affiliates, officers, directors, agents, employees and third parties providing content) harmless from and against any claim or demand and all losses incurred related to the use of the Site.
We use a diverse range of information, text, photographs, designs, graphics, images, sound and video recordings, animation, content, advertisement and other materials and effects (collectively "Materials") for the search services on the Media. We provide the Material through the Media FOR YOUR PERSONAL AND NON-COMMERCIAL USE ONLY.</div>
或者尝试将样式表添加到您的应用程序并尝试使用如图所示的样式
.mytext{
text-align:justify;
}
并在您的网页中,您可以使用它,如图所示
<div style="mytext">your text goes here...</div>
答案 1 :(得分:0)
在HTML中使用<p style="text-align:justify;">...</p>
。最好在CSS中定义样式元素
HTML
<p class="justified">...</p>
CSS
.justified {
text-align: justify;
}
如果您使用Label
,则可以设置HorizontalAlign
属性:
<asp:Label HorizontalAlign="Justify" runat="server">
Some Content
</asp:Label>
答案 2 :(得分:0)
我尝试了大多数建议并且无法使其工作(gridview),因此添加了一个css类......
.LabelFormat
{
padding-bottom:4px
}
跛脚但它起作用了。