欢迎使用CSDN-markdown编辑器

来源:互联网 发布:n9软件网 编辑:程序博客网 时间:2024/06/15 22:37

legend元素宽度显示问题

在火狐浏览器下是100%的拉长显示的;google浏览器下是正常;详细请看效果图:

  • 火狐浏览器
  • 这里写图片描述
  • google浏览器
  • 这里写图片描述

宽度显示问题

在火狐下是100%的拉长显示的;google浏览器下是正常的;IE9浏览器与google相同

解决方法

.fieldset-border legend{
padding: 5px 10px;
width:100px;
margin:0px auto 5px;
font-weight: bold;
border-style:dashed;
}
legend元素必须给定一个单位宽度(width:100px;)
把fieldset 修改为div就好

代码块

代码块语法遵循标准markdown代码,例如:

    <div class="fieldset-border">        <legend>应用系统列表</legend>    </div>    <fieldset  class="fieldset-border">        <legend>应用系统列表</legend>    </fieldset><style type="text/css">.fieldset-border{    border-style:dashed;     padding:0px;    border-width:1px;}.fieldset-border legend{    padding: 5px 10px;    margin:0px auto 5px;    font-weight: bold;    border-style:dashed;}div.fieldset-border{    margin-top:25px;}div.fieldset-border legend{    position:relative;    margin-top:-18px;}</style>

浏览器兼容

  1. 目前,本编辑器对Chrome浏览器支持最为完整。建议大家使用较新版本的Chrome。
  2. IE9以下与google浏览器下效果相同
  3. 火狐浏览器存在以下问题
  4. google浏览器正常显示