切换按钮不工作,菜单无法正常向下滑动

Toggle button is not working, menu does not slide down properly

本文关键字:按钮 工作 菜单      更新时间:2023-09-26

当我点击它时,我有一个测试菜单,它向下滑动,在一个div上显示四个div。这是小提琴:小提琴链接。

这是html:

切换按钮使失效

<ul>
  <li id="togglebtn"class="quizli"><a href="#">Quizes</a></li>
  </ul>
 <div id="quizmenu" class="bubble">
                        <div id="subdiv1" class="subdiv">
                            <h5><img src="image/earth.png" alt="earth">WorldGK</h5>
                                <a>gffdfd</a>
                                <a>gfdddd</a>
                                <a>gfddddd</a>
                        </div>
                        <div id="subdiv2"class="subdiv">
                            <h5><img src="image/computer.png" alt="earth">Computer</h5>
                                <a>gfdddddd</a>
                                <a>gfddddddd</a>
                                <a>gfddddddd</a>
                        </div>
                        <div id="subdiv3" class="subdiv">
                            <h5><img src="image/dictionary.png" alt="earth">English</h5>
                                <a>gfgdfdfdfd</a>
                                <a>gfdfdfd</a>
                                <a>gfdfdfdfdd</a>
                        </div>
                        <div id="subdiv4" class="subdiv">
                            <h5><img src="image/code.png"     alt="earth">Programming</h5>
                                <a>C#</a>
                                <a>gfgfdgfdgfgfd</a>
                                <a>gfdffgfgf</a>
                        </div>
                        <div id="subdiv5" class="subdiv">
                            <h5><img src="image/inter2.png" alt="earth">Interview</h5> 
                                <a>ggdfgfdgfd</a>
                                <a>gfgfdgfdgfgfd</a>
                                <a>gfdffgfgf</a>
                        </div>
                </div>

这是css:

.scrollup :hover应为.scrollup:hover

您将不透明度设置为1,但不透明度已经为1。

也许你可以为正常状态设置0.5的不透明度,然后在悬停1。

试试这个:

.scrollup {
  height:50px;
  width:50px;
  right:50px;
  bottom:50px;
  position:fixed;
  opacity: 0.5;
  filter: alpha(opacity=50);
  -webkit-transition: all .3s ease;
  -o-transition: all .4s ease;
  transition: all .4s ease;
  background: url('http://s29.postimg.org/59qiyrlab/freeiconmaker_1.png?noCache=1447752779');
  background-repeat:no-repeat;
      background-size:contain
}
.scrollup:hover {
  opacity: 1.0;
  filter: alpha(opacity=100);
}

我添加了一个额外的

 -webkit-transition: all .3s ease;
 -o-transition: all .4s ease;
 transition: all .4s ease;

稍微缓和一下。