小编Car*_*los的帖子

选择框 css 属性不是从其父级继承的。

select 标签似乎没有从它的父级继承,这是预期的吗?我在这段简单的代码中做错了什么?

<!DOCTYPE html>
<html lang="en">
    <head>
        <style>
        form
        {
            color:#0000cc;
            font-size: 10px;
        }      
        </style>        
        <title>Select boxes not affected by its css parent propertieses</title>
    </head>

<body>

<form action="#" method="POST">
    <div id="refine_race_search">
    <div><label for="test">my_label</label>
    <select>
        <option value="1">value 1</option>
        <option value="1">value 2</option>
        <option value="1">value 3</option>
        <option value="1">value 4</option>
    </select>
    </div>
    <input type="submit" value="Send"/>
    </div>
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

css inheritance select

4
推荐指数
1
解决办法
1316
查看次数

标签 统计

css ×1

inheritance ×1

select ×1