[英]Give Title of a Fieldset a Background Color
我不知道如何使字段集的標題具有純色背景色。 當我嘗試在CSS中更改顏色時,它將為整個fieldset框着色。
html
<fieldset>
<legend >Personalia:</legend>
Name: <input type="text"><br>
Email: <input type="text"><br>
Date of birth: <input type="text">
</fieldset>
的CSS
fieldset legend {background:red}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.