Show toolbar

2011年9月7日 星期三

CSS Play button

標題:簡易CSS播放功能鍵
HTML (index.html):
<style>
button {
    background-color: white;
    width: 30px;
    padding: 5px;
    border-radius: 8px;
    -moz-border-radius: 8px;
    -webkit-border-radius: 8px;
}
span.play {
    border-color: transparent transparent transparent black;
    border-style: solid;
    border-width: 8px 0 8px 16px;
    float: left;
    height: 0;
    text-indent: -999px;
    width: 0;
}
span.pause {
    border-color: transparent black;
    border-style: solid;
    border-width: 0 4px 0;
    float: left;
    height: 16px;
    text-indent: -999px;
    width: 8px;
}
span.stop {
    border: 8px solid black;
    float: left;
    height: 0;
    text-indent: -999px;
    width: 0;
}
</style>
<button title="Play"><span class="play">Play</span></button>
<button title="Pause"><span class="pause">Pause</span></button>
<button title="Stop"><span class="stop">Stop</span></button>
範例:

說明:
純粹使用CSS建立播放功能鍵。

參考:
http://mediamilan.com/create-playback-buttons-with-just-css/

沒有留言:

張貼留言