CSS3实现的player播放按钮 (实用)

191 篇文章 0 订阅

原文出处:https://blog.csdn.net/iteye_18428/article/details/82324472 (详见原文)

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
 

.playContainer { 
    position: relative; 
    float: left; 
    background: rgba(0, 0, 0, 0.8); 
    padding: 20px; 
}

.playContainer li { 
    position: relative; 
    float: left; 
    border: 25px solid #404040; 
    color: #404040; 
    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 #fff; 
    border-width: 8px 0 8px 12px;  
    width: 0; 
    height: 0; 
}

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

.stopBtn a { 
    border: 7px solid #fff; 
    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 #fff 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 #fff transparent; 
    top:-26px; 
    left:-8px; 
}

.ejectBtn a.dash { 
    border-width: 0 0 4px; 
    border-color: transparent transparent #fff; 
    height: 0; 
    width:16px; 
    left: -8px; 
    top: 4px; 
}

 

 

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值