Html 4个标签中只有1个未显示
我有一个显示学校模型信息列表的视图。我用标签把它分解成不同的部分。尽管由于某些原因,标题为“附加学校详细信息”的第三个标签未显示,而其余的则显示。有人知道这是为什么吗 其他3个标签显示得很好,我看不出是什么原因导致第3个标签不显示 编辑:好像我放大了第三个hr标签显示。为什么会这样 delete.cshtmlHtml 4个标签中只有1个未显示,html,css,Html,Css,我有一个显示学校模型信息列表的视图。我用标签把它分解成不同的部分。尽管由于某些原因,标题为“附加学校详细信息”的第三个标签未显示,而其余的则显示。有人知道这是为什么吗 其他3个标签显示得很好,我看不出是什么原因导致第3个标签不显示 编辑:好像我放大了第三个hr标签显示。为什么会这样 delete.cshtml <br /> <h3>Are you sure you want to delete this Booking entry?</h3> <h4&g
<br />
<h3>Are you sure you want to delete this Booking entry?</h3>
<h4>@Model.OfficialSchoolName</h4>
<br />
<hr />
<div>
<dl class="dl-horizontal">
<h4>School Contact Details</h4>
<br />
<dt>
@Html.DisplayNameFor(model => model.RollNumber)
</dt>
<dd>
@Html.DisplayFor(model => model.RollNumber)
</dd>
<dt>
@Html.DisplayNameFor(model => model.OfficialSchoolName)
</dt>
<dd>
@Html.DisplayFor(model => model.OfficialSchoolName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.TeacherName)
</dt>
<dt>
@Html.DisplayNameFor(model => model.PrincipalName)
</dt>
<dd>
@Html.DisplayFor(model => model.PrincipalName)
</dd>
<dd>
@Html.DisplayFor(model => model.TeacherName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Address1)
</dt>
<dd>
@Html.DisplayFor(model => model.Address1)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Address2)
</dt>
<dd>
@Html.DisplayFor(model => model.Address2)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Address3)
</dt>
<dd>
@Html.DisplayFor(model => model.Address3)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Address4)
</dt>
<dd>
@Html.DisplayFor(model => model.Address4)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Eircode)
</dt>
<dd>
@Html.DisplayFor(model => model.Eircode)
</dd>
<dt>
@Html.DisplayNameFor(model => model.County)
</dt>
<dd>
@Html.DisplayFor(model => model.County)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Email)
</dt>
<dd>
@Html.DisplayFor(model => model.Email)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PhoneNumber)
</dt>
<dd>
@Html.DisplayFor(model => model.PhoneNumber)
</dd>
<hr />
<h4>Camp Details</h4>
<br />
<dt>
@Html.DisplayNameFor(model => model.Date)
</dt>
<dd>
@Html.DisplayFor(model => model.Date)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LecturerName)
</dt>
<dd>
@Html.DisplayFor(model => model.LecturerName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.StartTime)
</dt>
<dd>
@Html.DisplayFor(model => model.StartTime)
</dd>
<dt>
@Html.DisplayNameFor(model => model.EndTime)
</dt>
<dd>
@Html.DisplayFor(model => model.EndTime)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Surveys)
</dt>
<dd>
@Html.DisplayFor(model => model.Surveys)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ClassGroups)
</dt>
<dd>
@Html.DisplayFor(model => model.ClassGroups)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Topics)
</dt>
<dd>
@Html.DisplayFor(model => model.Topics)
</dd>
<hr />
<h4>Additional School Details</h4>
<br />
<dt>
@Html.DisplayNameFor(model => model.LocalAuthority)
</dt>
<dd>
@Html.DisplayFor(model => model.LocalAuthority)
</dd>
<dt>
@Html.DisplayNameFor(model => model.AcademicYear)
</dt>
<dd>
@Html.DisplayFor(model => model.AcademicYear)
</dd>
<dt>
@Html.DisplayNameFor(model => model.DeisSchool)
</dt>
<dd>
@Html.DisplayFor(model => model.DeisSchool)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SchoolGender)
</dt>
<dd>
@Html.DisplayFor(model => model.SchoolGender)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PupilAttendanceType)
</dt>
<dd>
@Html.DisplayFor(model => model.PupilAttendanceType)
</dd>
<dt>
@Html.DisplayNameFor(model => model.IrishClassification)
</dt>
<dd>
@Html.DisplayFor(model => model.IrishClassification)
</dd>
<dt>
@Html.DisplayNameFor(model => model.GaeltachtArea)
</dt>
<dd>
@Html.DisplayFor(model => model.GaeltachtArea)
</dd>
<dt>
@Html.DisplayNameFor(model => model.FeePayingSchool)
</dt>
<dd>
@Html.DisplayFor(model => model.FeePayingSchool)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Religion)
</dt>
<dd>
@Html.DisplayFor(model => model.Religion)
</dd>
<dt>
@Html.DisplayNameFor(model => model.OpenClosedStatus)
</dt>
<dd>
@Html.DisplayFor(model => model.OpenClosedStatus)
</dd>
<dt>
@Html.DisplayNameFor(model => model.TotalGirls)
</dt>
<dd>
@Html.DisplayFor(model => model.TotalGirls)
</dd>
<dt>
@Html.DisplayNameFor(model => model.TotalBoys)
</dt>
<dd>
@Html.DisplayFor(model => model.TotalBoys)
</dd>
<dt>
@Html.DisplayNameFor(model => model.TotalPupils)
</dt>
<dd>
@Html.DisplayFor(model => model.TotalPupils)
</dd>
<hr />
<h4>School Coordinates</h4>
<br />
<dt>
@Html.DisplayNameFor(model => model.X)
</dt>
<dd>
@Html.DisplayFor(model => model.X)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Y)
</dt>
<dd>
@Html.DisplayFor(model => model.Y)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ITMEast)
</dt>
<dd>
@Html.DisplayFor(model => model.ITMEast)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ITMNorth)
</dt>
<dd>
@Html.DisplayFor(model => model.ITMNorth)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Latitude)
</dt>
<dd>
@Html.DisplayFor(model => model.Latitude)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Longitude)
</dt>
<dd>
@Html.DisplayFor(model => model.Longitude)
</dd>
</dl>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
@Html.ActionLink("Back to List", "Index")
</div>
}
</div>
该结构的完整性应保持不变。你把标题元素和元素放在这个结构中,这是不可持续的。我不确定你是否有css影响你的线条高度,或者缩放是否会影响你的视线,但是改变下面结构的完整性是不明智的:
<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>
如果您想要跨浏览器支持,您只需要拥有和作为
请阅读:
在编写一个好的HTML代码时,你应该总是考虑元素的性质:
标记是内联标记,同时也是块级标记
不应使用内联级别标记来分隔块级别标记。您可能会通过这种方式获得结果,但这是不可持续的,而且并非每个浏览器对此都有相同的反应
可以在和中使用内联元素。元素,如:、、等,这些元素对文本或图像有影响,可用于上述元素内部,但不能直接用于内部
您仍然可以使用css和类来实现所需的视觉效果。有很多因素,如显示器分辨率、缩放、hr像素大小、线条颜色等。另一种方法是使用border top或border bottom css属性。没问题。乐意帮忙;您仍然可以使用css和类将一些元素加粗,并使用更大的字体和填充。