0
我有一個4個圖標粘滯邊欄彈出單個「div」是我需要而不是懸停在它彈出的圖標上包含div在我的情況div class = 「sticky-bx」在一起。我只使用CSS來做的效果,是否有可能與CSS單獨做或我必須使用jQuery?粘滯側欄與個別彈出div在懸停
<div class="sticky-bx">
<div class="hover-bx">
<div class="ico-bx" id="sbx1">
<i class="fa fa-2x fa-phone-square"></i>
</div>
<div class="ico-txt" id="sbt1">
<span>Call Back</span>
</div>
</div><br><br>
<div class="hover-bx">
<div class="ico-bx" id="sbx2">
<i class="fa fa-2x fa-pencil-square-o"></i>
</div>
<div class="ico-txt" id="sbt2">
<span>Book An Appointment</span>
</div>
</div><br><br>
<div class="hover-bx">
<div class="ico-bx" id="sbx3">
<i class="fa fa-2x fa-calendar"></i>
</div>
<div class="ico-txt" id="sbt3">
<span>Camps & Events</span>
</div>
</div><br><br>
<div class="hover-bx">
<div class="ico-bx" id="sbx4">
<i class="fa fa-2x fa-globe"></i>
</div>
<div class="ico-txt" id="sbt4">
<span>Virtual Tour</span>
</div>
</div><br><br>
</div>
.sticky-bx {
position: fixed;
z-index: 400;
right: 0px;
top: 30%;
padding: 16px;
background-color: #fff;
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
-webkit-box-shadow: -2px 2px 2px 0px rgba(0, 0, 0, 0.10);
-moz-box-shadow: -2px 2px 2px 0px rgba(0, 0, 0, 0.10);
box-shadow: -2px 2px 2px 0px rgba(0, 0, 0, 0.10);
min-width: 60px;}
.hover-bx {
width: auto;
position: static;
background-color: #fff;}
.ico-bx {
float: left;}
.ico-txt {
width: auto;
margin-left: 10px;
float: left;
padding: 6px;
display: none;}
.ico-bx:hover + .ico-txt,.ico-txt:hover {
display: block;
position: relative;
z-index: 500px;}
張貼工作代碼段 – LGSon
這裏是工作代碼的鏈接片斷http://codepen.io/cloudzedge/pen/ZpONqy –