从图例元素中删除fieldset boarder和box-shadow [英] Remove fieldset boarder and box-shadow from legend element

查看:188
本文介绍了从图例元素中删除fieldset boarder和box-shadow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to remove the background lines and shadows from the area where my legend is. Once I set the background to transparent in the legends property I can still see the lines. My code is as follows

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;
 }

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

Any suggestions on how to fix this?

推荐答案

这将解决问题

fieldset {
    border: 0;
}

这篇关于从图例元素中删除fieldset boarder和box-shadow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆