.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(); })}
鼠標hover離開了父元素位置,子元素就消失,但是父子元素間有空隙怎么辦,如圖
拉莫斯之舞
2019-03-14 18:14:57