Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html div背景色不影响_Html_Css - Fatal编程技术网

Html div背景色不影响

Html div背景色不影响,html,css,Html,Css,我试图设置div背景色(class=“markerDiv”),但我很难找到我缺少的内容。我相信它会很小,但需要帮助。非常感谢 HTML: <div id="map_Marker_Check_Block"> <div class="markerDiv" id="maker_school"> <label class="marker_label">School</label> <input class= "

我试图设置div背景色(class=“markerDiv”),但我很难找到我缺少的内容。我相信它会很小,但需要帮助。非常感谢

HTML

<div id="map_Marker_Check_Block">
    <div class="markerDiv" id="maker_school">
        <label class="marker_label">School</label> <input class=
        "marker_ckeckbox" name="markerType" type="checkbox" value="school">
    </div><br>

    <div class="markerDiv" id="maker_gym">
        <label class="marker_label">Gym</label> <input class="marker_ckeckbox"
        name="markerType" type="checkbox" value="gym">
    </div><br>
</div>
.markerDiv {
    width: 14em;
    height: 48px;
    margin-left: 5px;
    clear: both;
    background-color: blue;
}

#map_Marker_Check_Block {
    display: block;
    position: absolute;
    width: 15em;
    height: 400px;
    top: 0;
    right: -12em;
    z-index: 10;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #FFF;
}

#maker_school {
    background: url(../Icons/google_marker/Map_school.png) no-repeat;
}
你应该尝试使用 #地图\标记\检查\块。标记{背景色:蓝色;}

因为id否决了许多类

或者只是背景色:蓝色!重要的;应该有效。

你应该尝试使用 #地图\标记\检查\块。标记{背景色:蓝色;}

因为id否决了许多类


或者只是背景色:蓝色!重要的;应该有用吗?

似乎有用?真奇怪。。那为什么不在我的代码中工作呢!!可能是缓存问题,您是否尝试清除缓存?a!我明白了,我正在给.markerDiv添加背景图像,它的大小是48px X 48px!如果我从div中删除图像;背景色似乎起作用了?真奇怪。。那为什么不在我的代码中工作呢!!可能是缓存问题,您是否尝试清除缓存?a!我明白了,我正在给.markerDiv添加背景图像,它的大小是48px X 48px!如果我从div中删除图像;背景色出现