[HTML/CSS]audio音乐进度条(一)外观

/ 7,981评论 / 39343阅读 / 2点赞

预期效果

由于audio标签自带的控制面板样式可能不合我们的心意,很多时候会想把自定义音乐播放器的样式,其中进度条也是不可少的。


实现

<span id="cmusic_control_span_progressBar">
    <div class="cmusic_displayFlex_class cmusic_control_progress_div">
        <span id="cmusic_control_span_loadProgress" style="width:80%"></span>
        <span id="cmusic_control_span_progress" style="width:50%"></span>
    </div>
</span>
/*外框*/
#cmusic_control_span_progressBar{
    border-radius: 50px;
    height: 20px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    position: relative;
    background: transparent;
    box-shadow: inset 2px 2px 4px #bcc5d6,
        inset -2px -2px 5px #feffff;
    border: 2px solid #d0f4ff;
    justify-content: center;
    transition: all 0.8s ease;
}
/*布局类*/
.cmusic_displayFlex_class {
    width: 100%;
    display: flex;
    margin-left: auto;
    margin-right: auto;
}
.cmusic_control_progress_div {
    position:absolute;
    width:94% !important;
    height:100%;
    align-items: center;
}
/*进度条*/
#cmusic_control_span_progress,
#cmusic_control_span_loadProgress{
    background: linear-gradient(90deg, #c4f4fe, #66ccff);
    border-radius: 50px;
    position: absolute;
    height: 60%;
    pointer-events: none;
    transition: width 0.5s ease;
    box-shadow: 2px 2px 10px #ccd3ff,
    -2px -2px 10px #ccd3ff;
}
/*加载进度条*/
#cmusic_control_span_loadProgress {
    background: linear-gradient(90deg, #abecd6, #fff9d2);
}

目录

本文我们聊了如何搞出进度条的外观,接下来我们将聊聊如何让进度条跟随<audio>的已播放时长改变播放进度

  1. JamesPouff说道:

    http://lisinopril.club/# zestril 10 mg

  2. Robertguelm说道:

    neurontin 10 mg: neurontin 204 – neurontin 300 mg buy

  3. ThomasTam说道:

    where can i get cheap clomid pills: how can i get generic clomid – can i purchase clomid now

  4. Marvinmef说道:

    neurontin 300 mg tablets neurontin 300 mg mexico neurontin price india

  5. ThomasTam说道:

    where can i get generic clomid pills: where to get generic clomid price – cost clomid pills

  6. ThomasTam说道:

    buy cytotec online fast delivery: buy cytotec over the counter – cytotec buy online usa

  7. RobertPet说道:

    http://gabapentin.club/# prescription medication neurontin

  8. Marvinmef说道:

    cytotec online buy cytotec over the counter Abortion pills online

  9. Marvinmef说道:

    lisinopril tabs 4mg can you buy lisinopril can i buy lisinopril over the counter in mexico

  10. RobertPet说道:

    http://clomiphene.shop/# where to buy clomid without prescription

  11. Marvinmef说道:

    prescription price for neurontin brand neurontin 100 mg canada neurontin 100 mg cap

  12. ThomasTam说道:

    lisinopril 7.5 mg: 16 lisinopril – best generic lisinopril

  13. Marvinmef说道:

    where to get generic clomid price can i purchase generic clomid pills cost generic clomid without insurance

  14. ThomasTam说道:

    drug neurontin 20 mg: prescription medication neurontin – medication neurontin

  15. Marvinmef说道:

    cytotec buy online usa buy cytotec in usa order cytotec online

  16. ThomasTam说道:

    lisinopril 1 mg tablet: lisinopril 20 mg 12.5 mg – lisinopril 20 mg price online

  17. Marvinmef说道:

    purchase cytotec buy cytotec over the counter buy cytotec in usa

  18. Robertguelm说道:

    lisinopril 40 mg on line: lisinopril 10 mg pill – lisinopril tablets uk

  19. Robertguelm说道:

    website: 25 mg lisinopril – online pharmacy lisinopril

  20. RobertPet说道:

    http://lisinopril.club/# prinivil 5 mg tablets

  21. Marvinmef说道:

    neurontin pills for sale neurontin cost australia canada neurontin 100mg discount

  22. JamesPouff说道:

    https://propeciaf.online/# get propecia price

  23. JamesPouff说道:

    http://gabapentin.club/# neurontin 100mg caps

  24. Marvinmef说道:

    cytotec buy online usa buy cytotec online fast delivery Cytotec 200mcg price

  25. ThomasTam说道:

    buy misoprostol over the counter: buy cytotec online – Misoprostol 200 mg buy online

  26. Marvinmef说道:

    buying clomid without rx cost generic clomid without dr prescription get clomid online

  27. Marvinmef说道:

    propecia pill buy cheap propecia prices cheap propecia

  28. Robertguelm说道:

    buying propecia for sale: cost generic propecia online – buying cheap propecia online

  29. ThomasTam说道:

    Cytotec 200mcg price: buy cytotec pills online cheap – cytotec pills buy online

  30. JamesPouff说道:

    http://propeciaf.online/# buy propecia pill

  31. JamesPouff说道:

    http://lisinopril.club/# lisinopril 10mg tablets price

  32. RobertPet说道:

    https://clomiphene.shop/# get cheap clomid without dr prescription

  33. Manuelloupe说道:

    mexico drug stores pharmacies best online pharmacies in mexico mexican drugstore online

  34. Manuelloupe说道:

    mexican border pharmacies shipping to usa mexican drugstore online mexican drugstore online

  35. Manuelloupe说道:

    mexican border pharmacies shipping to usa pharmacies in mexico that ship to usa mexico drug stores pharmacies

  36. Robertswela说道:

    mexican rx online: mexican border pharmacies shipping to usa – purple pharmacy mexico price list

  37. Robertswela说道:

    buying prescription drugs in mexico: purple pharmacy mexico price list – mexico drug stores pharmacies

  38. Williamlyday说道:

    https://mexicanpharmacy1st.online/# mexican border pharmacies shipping to usa

  39. Robertswela说道:

    pharmacies in mexico that ship to usa: mexican pharmacy – buying prescription drugs in mexico

  40. Williamlyday说道:

    https://mexicanpharmacy1st.shop/# mexican rx online

  41. Thomasliest说道:

    mexican border pharmacies shipping to usa: reputable mexican pharmacies online – purple pharmacy mexico price list

  42. Manuelloupe说道:

    buying from online mexican pharmacy reputable mexican pharmacies online mexico drug stores pharmacies

  43. Albertnab说道:

    п»їbest mexican online pharmacies: reputable mexican pharmacies online – п»їbest mexican online pharmacies

  44. Manuelloupe说道:

    purple pharmacy mexico price list mexican border pharmacies shipping to usa mexican mail order pharmacies

  45. Manuelloupe说道:

    mexican border pharmacies shipping to usa best online pharmacies in mexico buying from online mexican pharmacy

  46. Albertnab说道:

    best online pharmacies in mexico: mexico pharmacies prescription drugs – п»їbest mexican online pharmacies

  47. Robertswela说道:

    purple pharmacy mexico price list: mexican online pharmacies prescription drugs – best mexican online pharmacies

  48. Robertswela说道:

    purple pharmacy mexico price list: medication from mexico pharmacy – medication from mexico pharmacy

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注