我有一個類的div。 side-buttons
。當用戶的鼠標懸停在div上時,該div將滑入和滑出。我想知道如何完全隱藏div並說出用戶的鼠標何時位於它將滑入的區域?div按鈕滑入和滑出屏幕(取決於用戶的鼠標)
我試圖得到關閉屏幕,但將無法正常工作時,我就在div
鼠標這是我的網站,它只會工作 - http://smati.ca/test/index.html(不要點擊繼續,而是按一下週圍的彈出模態下車模式疊加在那裏,你可以看到在行動DIV)
這裏是我的CSS代碼:
.side-buttons {
position: absolute;
right: -100px;
top: 55%;
-webkit-transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
-ms-transition: all .4s ease-in-out;
-o-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
}
.side-buttons:hover {
right: 0px;
}
.side-buttons a {
display: block;
background: linear-gradient(to bottom, #33a9c3 15%, #b1ccbb 100%);
border-radius: 0;
box-shadow: none;
border: none;
color: #f5f5f5;
font-size: 22px;
font-family: "Lato", sans-serif;
}
.side-buttons a small {
font-size: 16px;
}
.side-buttons a:hover,
.side-buttons a:focus,
.side-buttons a:active {
background: linear-gradient(to bottom, #33a9c3 15%, #b1ccbb 100%);
color: #f5f5f5;
}
.side-buttons a:nth-child(2) {
background: linear-gradient(to left, #de3c88 15%, #f0a473 100%);
}
有點困惑如何將這些應用到我的現有代碼 – drifterOcean19
右側@ drifterOcean19僞招工作相同的,無論向左或向右...更新我的回答 – LGSon
非常感謝,這個作品太 –