用CSS实现播放、暂停、停止、上一首、下一首按钮

html

复制代码
 <section class="playContainer">
    <li class="playBtn">
      <a href="#" title="start">Start</a>
    </li>
    <li class="pauseBtn">
      <a href="#" title="pause">Pause</a>
    </li>
    <li class="stopBtn">
      <a href="#" title="stop">Stop</a>
    </li>
    <li class="forwardBtn playBtn">
      <a href="#" title="forward">Forward</a>
      <a href="#" title="forward">Forward</a>
    </li>
    <li class="rewindBtn">
      <a href="#" title="rewind">Rewind</a>
      <a href="#" title="rewind">Rewind</a>
    </li>
    <li class="ejectBtn">
      <a href="#" class="arrow">Eject</a>
      <a href="#" class="dash">Eject</a>
    </li>
  </section>
复制代码

css

复制代码
<style>
  .playContainer li {
    position: relative;
    display: block;
    float: left;
    border: 25px solid #fff;
    color: #fff;
    height: 0;
    width: 0;
    -webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    -o-border-radius: 100%;
    border-radius: 100%;
    margin: 0 20px;
  }

  .playContainer a {
    border-style: solid;
    text-indent: -9999px;
    position: absolute;
    top: -8px;
    left: -3px;
  }

  .playBtn a {
    border-color: transparent transparent transparent #23a8f2;
    border-width: 8px 0 8px 12px;
    width: 0;
    height: 0;
  }

  .pauseBtn a {
    border-color: transparent #23a8f2;
    border-width: 0 6px;
    height: 15px;
    width: 6px;
    left: -9px;
  }

  .stopBtn a {
    border: 7px solid #23a8f2;
    height: 0;
    width: 0;
    left: -7px;
    top: -7px;
  }

  .forwardBtn a {
    border-left-width: 8px;
    left: 1px;
  }

  .forwardBtn a:first-child {
    margin-left: -7px;
  }

  .rewindBtn a {
    border-width: 8px 8px 8px 0;
    border-color: transparent #23a8f2 transparent transparent;
    width: 0;
    height: 0;
  }

  .rewindBtn a:first-child {
    margin-left: -7px;
  }

  .ejectBtn a.arrow {
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent #23a8f2 transparent;
    top: -26px;
    left: -8px;
  }

  .ejectBtn a.dash {
    border-width: 0 0 4px;
    border-color: transparent transparent #23a8f2;
    height: 0;
    width: 16px;
    left: -8px;
    top: 4px;
  }
</style>
复制代码

 效果图

 

posted @   xuanPhoto  阅读(234)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 记一次.NET内存居高不下排查解决与启示
历史上的今天:
2017-01-18 label表单的关联性
2017-01-18 attr返回被选元素的属性值
2017-01-18 animate动画回调函数
2017-01-18 triggerHandler不执行事件默认值
2017-01-18 trigger自动执行事件
2017-01-18 js与jquery对象的互转
2017-01-18 让低版本浏览器支持html5的标签
点击右上角即可分享
微信分享提示