问题
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?
回答1:
This will do the trick
fieldset {
border: 0;
}
回答2:
The border
and box-shadow
are on the fieldset
. Just add the following and it should work:
fieldset{
border:0;
box-shadow: none;
}
来源:https://stackoverflow.com/questions/19529312/remove-fieldset-boarder-and-box-shadow-from-legend-element