.app-main .main-header{ position: relative; display: flex; height: 70px; background-color: #f5f5f7; box-sizing: border-box; border-bottom: 1px solid #cdd0d1; cursor: pointer;}.app-main .main-header .header-dialog{ display: none; position: absolute; top: 80px; left: 45px; width: 120px; height: 135px; padding: 25px; background-color: #fff; box-sizing: border-box; z-index: 1000; box-shadow:1px 1px 5px 5px rgba(6, 15, 24, 0.1)}hoverFn()function hoverFn(){ $('.app-main .main-header .header-left').hover(function(){ $('.app-main .main-header .header-dialog').fadeToggle(); })}
4 回答
慕神8447489
TA贡献1780条经验 获得超1个赞
纯css的话要不就在外面包裹一个透明div扩大一下范围,要不就往上移动一点。。或者用伪元素
.app-main .main-header .header-dialog:before{
display:block;
content:''
position:absolute;
height: 10px;
width:100%;
top:-10px;
left:0;
}
添加回答
举报
0/150
提交
取消