<form class="form" id="profile_form">
<legend>Your profile</legend>
<div class="control-group ">
<label class="control-label">Phone</label>
<div class="controls">
<input type="text" id="phone" class="span5">
<div class="help-block phone_not_confirmed need_confirm">
To confirm your phone number, please check for a text message from us.
</div>
<label class="checkbox">
<input type="checkbox" id="phone_visible">
Display my phone number to the public
</label>
</div>
</div>
.... ....
在 IE8 中,文本“您的个人资料”出现,但没有样式。注意:我使用的是 Bootstrap。
最佳答案
IE 中有一个奇怪的行为。 IE7 和 IE8 关闭它遇到的不在 fieldset 元素内的图例元素,并将其内容移出到相邻的文本节点。
因此,解决方法是将图例包装在字段集中。
关于html - 为什么 "Legend"在 ie8 中没有样式化?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16229436/