我试图将标签的内容居中。这是我要居中的 div:
<div class="Paging" style="margin: 0 auto;">
<div class="PageOfPage" style="display:inline-table;padding: 10px;">
Page<label id="CurrentPage">1</label> From @Model.CountPage
</div>
<div class="RecordsOfRecord" style="display:inline-table;padding: 10px;">
Record
<label id="FromRecord">
@{
int i1 = (Model.CurrentPage-1)*Model.CountRecordInPage;
if (i1 == 0)
{
i1 = 1;
}
string recordFrom = i1.ToString(CultureInfo.InvariantCulture);
}@recordFrom
</label>
To
<label id="ToRecord">@Model.CountRecordInPage</label>
From @Model.AllRecord
</div>
</div>
肯定有一些我遗漏的东西,但我没有想法。
最佳答案
关于html - 如何将div中的内容居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19642037/