等不了天亮 2019-03-08 21:28 采纳率: 0%
浏览 833

轮播图前后按钮无法正常显示

* {margin: 0; padding: 0;list-style: none;text-decoration: none;} #box {width: 600px;height: 400px;border: 1px solid aliceblue;overflow: hidden;position: relative;margin: 20px auto;} #box img {width: 600px;height: 400px;} .arrow {display: none; width: 30px; height: 30px; line-height: 30px; font-size: 20px; text-align: center;background: rgba(0,0,0, .3);color: #fff;z-index: 3;position: absolute;margin-top: 185px;} #box:hover .arrow {display: block;} .arrow:hover {background: rgba(0,0,0, .7);} #prev {left: 20px;} #next {right: 20px;} .button .on {background: orangered;} .button {width: 100px;height: 10px;position: absolute;left: 250px;bottom: 10px;z-index: 2;} .button span:nth-child(1) {margin-left: 0;} .button span {display: block;float: left;width: 10px;height: 10px;border-radius: 50%;border: 1px solid #fff;margin-left: 8px;}
    <script type="text/javascript">

    </script>
</head>
<body>
    <div id="box">
        <ul>
            <li><img src="img/1.jpg" alt="1"></li>
            <li><img src="img/2.jpg" alt="2"></li>
            <li><img src="img/3.jpg" alt="3"></li>
            <li><img src="img/4.jpg" alt="4"></li>
            <li><img src="img/5.jpg" alt="5"></li>
        </ul>
        <div class="button">
            <span class="on"></span>
            <span></span>
            <span></span>
            <span></span>
            <span></span>
        </div>
        <a href="javascript:;" class="arrow" id="prev" >&lt;</a>
        <a href="javascript:;" class="arrow" id="next" >&gt;</a>
    </div>
    为什么这样写控制前后轮播的按钮无法正常显示?
  • 写回答

1条回答 默认 最新

  • 等不了天亮 2019-03-08 21:30
    关注
                <a href="javascript:;" class="arrow" id="prev" >&lt;</a>
        <a href="javascript:;" class="arrow" id="next" >&gt;</a>
                <ul>
            <li><img src="img/1.jpg" alt="1"></li>
            <li><img src="img/2.jpg" alt="2"></li>
            <li><img src="img/3.jpg" alt="3"></li>
            <li><img src="img/4.jpg" alt="4"></li>
            <li><img src="img/5.jpg" alt="5"></li>
        </ul>
        <div class="button">
            <span class="on"></span>
            <span></span>
            <span></span>
            <span></span>
            <span></span>
        </div>
        这样写便可以正常显示,但是并不知道为什么
    
    评论

报告相同问题?

悬赏问题

  • ¥15 用三极管设计—个共射极放大电路
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示