html - 从 Chrome 迁移到 IE11 的主要样式问题
问题描述
我正在处理的屏幕在 Chrome 中看起来不错,但是当我在 IE11 中打开它时,它变得一团糟。我一直在搜索旧问题,但似乎无法确定问题所在。
铬合金:
IE:
<div class="row">
<div class="col-md-12">
<div class="form-group" style="display: flex; justify-content: space-between">
<div>
@Html.Label("NT User Id:", new { style = "font-size: medium" })
@Html.Label("* ", new { @class = "text-danger", style = "font-weight: bold; font-size: medium" })
</div>
<div>
@Html.TextBoxFor(m => m.User_Id, new { @class = "form-control", @maxlength = 20, style = "border: none; font-size: 14px; width: 260px", placeholder = "NT User ID" })
@Html.ValidationMessageFor(m => m.User_Id, String.Empty, new { @class = "text-danger" })
</div>
</div>
<div class="form-group" style="display: flex; justify-content: space-between">
<div>
@Html.Label("Last Name:", new { style = "font-size: medium" })
@Html.Label("* ", new { @class = "text-danger", style = "font-weight: bold; font-size: medium" })
</div>
<div>
@Html.TextBoxFor(m => m.LastName, new { @class = "form-control", @maxlength = 50, style = "border: none; font-size: 14px; width: 260px", placeholder = "User Last Name" })
@Html.ValidationMessageFor(m => m.LastName, String.Empty, new { @class = "text-danger" })
</div>
</div>
<div id="ddlNewUserHealthPlan" class="form-group" style="display: flex; justify-content: space-between">
<div>
@Html.Label("Health Plan:", new { style = "font-size: medium" })
@Html.Label("* ", new { @class = "text-danger", style = "font-weight: bold; font-size: medium" })
</div>
<div>
@Html.DropDownListFor(m => m.NewUserHealthPlans, (IEnumerable<SelectListItem>)Model.GetHealthPlans(Model.HEALTHPLANLIST), "Select a Healthplan ---", new { @class = "form-control", @id = "ddlNewUserHealthPlanSelect", style = "font-size: 14px; border: none; width: 260px; padding-bottom: 0" })
@Html.ValidationMessageFor(m => m.NewUserHealthPlans, String.Empty, new { @class = "text-danger" })
</div>
</div>
解决方案
所以解决这个问题的主要方法是使用前缀,它解决了许多问题。但是,我最终也删除了很多 Flexbox 并使用纯 HTML 和 CSS。这让我可以根据需要设置页面样式,并在我工作的时间限制内交付它。
经验教训:提前计划这种跨浏览器兼容性。
推荐阅读
- reactjs - 将选择框值重置为默认 onChange Reactjs
- python - flask-mail 和 twilio 具有相同的函数名称,称为 Message()。如何解决名称冲突
- debugging - Vim:如何开始和停止记录正在发生的一切?
- python - ZODB 忽略目标缓存对象计数和目标缓存内存大小
- sql - 时间戳数据类型上的 Oracle max 函数
- python - 如何用json序列化对象
- excel - 复制工作表时出现对象类型错误
- angular - 从下拉菜单中选择自定义选项后如何启用输入文本框?
- informix - 如何确定在创建 informix 表时将哪些值作为扩展区大小和下一个大小?
- bash - 如何将多个参数传递给 screen 命令中调用的脚本?