Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.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 这是什么边界_Html_Css_Background_Z Index_Border - Fatal编程技术网

Html 这是什么边界

Html 这是什么边界,html,css,background,z-index,border,Html,Css,Background,Z Index,Border,我有两个div,两个div上都有边框。当我将z-index设置为一个高于另一个时,边界不也应该被更高的z-index div阻塞吗 我能做些什么来实现这一点吗?它们目前是透明的。添加背景色 #b { left: 15px; top: 15px; border: 1px solid blue; z-index: 2; background-color:#ffffff <---- here } #b{ 左:15px; 顶部:15px; 边框:1px纯蓝

我有两个div,两个div上都有边框。当我将z-index设置为一个高于另一个时,边界不也应该被更高的z-index div阻塞吗


我能做些什么来实现这一点吗?

它们目前是透明的。添加背景色

#b {
    left: 15px;
    top: 15px;
    border: 1px solid blue;
    z-index: 2;
    background-color:#ffffff <---- here
}
#b{
左:15px;
顶部:15px;
边框:1px纯蓝色;
z指数:2;

背景色:#ffffff设置显式的
背景色

#b {
    left: 15px;
    top: 15px;
    border: 1px solid blue;
    z-index: 2;
    background-color: white;
}

您需要将背景颜色设置为:

#b { background-color: #fff }

在拖放排序环境中,我对表行也有同样的问题。将背景设置为特定颜色(style=“background color:White”),它会将其覆盖。如果不设置颜色,它将假定没有背景,只绘制背景后面的内容(当它没有重叠时,这算不了什么,所以它看起来像一个坚实的背景,而实际上它是空的)