【问题标题】:Remove fieldset boarder and box-shadow from legend element从图例元素中删除字段集边框和框阴影
【发布时间】:2013-10-31 23:58:19
【问题描述】:

我正在尝试从我的图例所在的区域移除背景线和阴影。在图例属性中将背景设置为透明后,我仍然可以看到线条。我的代码如下

HTML:

<fieldset>
<legend>text goes here</legend>
</fieldset>

CSS:

fieldset {
        margin:20px;
        padding:0 10px 10px;
        border:1px solid #666;
        border-radius:10px;
        box-shadow:0 0 10px #666;
        padding-top:10px;
 }  
 legend {
     margin: 0px 5px;
     padding: 5px;
     white-space: nowrap;
     background: transparent ; 
     font-weight: bold;
     font-size: 2em;
 }

关于如何解决此问题的任何建议?

【问题讨论】:

    标签: css html legend fieldset


    【解决方案1】:

    这样就可以了

    fieldset {
        border: 0;
    }
    

    【讨论】:

      【解决方案2】:

      borderbox-shadowfieldset 上。只需添加以下内容,它应该可以工作:

      fieldset{
         border:0;
         box-shadow: none;
      }
      

      【讨论】:

      • 我需要边框和阴影框保留在字段集的其余部分周围,而不是图例所在的位置。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-12
      • 2022-01-01
      • 2019-01-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多