[WP]修改WP插件样式(简码插入)思路之一(修改AudioIgniter插件样式)

/ 6,376评论 / 25624阅读 / 0点赞

简介

修改插件样式的方式有多种,可以直接通过wordpress自带的插件文件编辑器修改插件文件,但显然插件更新时需要重新修改。本文将介绍通过”自定义HTML“模块来修改通过简码插入的插件样式。


前言/起因

起初是想建一个在线播放音乐的网站,需要一个音乐播放器插件,且需要带有播放列表,循环播放等功能。但一直找不到好用的,最后找到了一个功能上满足我的基本需求的插件:AudioIgniter。但它的外观没有长在我的审美上,于是用上刚学俩星期的前端三件套,走上了自己动手,丰衣足食的道路。


AudioIgniter样式对比


AudioIgniter插件样式源码/使用方法

样式源码

<style>
/*取消原来的部分设置*/
.ai-wrap .ai-track.ai-track-active, .ai-wrap .ai-track:hover {
    background-color: transparent;  
    background: rgba( 255, 255, 255, 0.25);
}
.ai-wrap .ai-track {
    background-color: transparent;
}
.ai-wrap .ai-track-control{
    border-left: transparent;
}

/*播放器背景div*/
.ai-wrap{
    background: linear-gradient(200deg,#8eeac7,#b5e6fe);
    /* 溢出隐藏 */
    overflow: hidden;
    /*圆角*/
    border-radius: 30px;
    /* 阴影 */
    box-shadow: 0 5px 20px rgba(102,204,255,2);
}

/*播放列表*/
.ai-track{}
.ai-track:hover, .ai-track-active{
    background: rgba( 255, 255, 255, 0.5 );
    backdrop-filter: blur( 6px );
    -webkit-backdrop-filter: blur( 6px );
    border-radius: 10px;
    border: 1px solid rgba( 255, 255, 255, 0.3);
    /* 阴影 */
    box-shadow: 0 2px 20px rgba(208, 216, 222, 1);
}
.ai-track-name{
    font-weight: 900;
    color:#535273;
}

/*专辑图*/
.ai-wrap .ai-track-no-thumb, .ai-wrap .ai-control-wrap-thumb{
    background-color: transparent;
}
.ai-track-no-thumb, .ai-track-thumb, .ai-wrap .ai-control-wrap-thumb{
    background: rgba( 255, 255, 255, 0.2);
    backdrop-filter: blur( 20px );
    -webkit-backdrop-filter: blur( 20px );
    border-radius: 10px;
    /* 阴影 */
    box-shadow: 0 2px 20px rgba(208, 216, 222, 1);
}


/*正在播放歌曲的标题*/
.ai-track-title span{
    font-weight: 900;
    color: #535273;
}
.ai-track-subtitle span{
    color:#b187a2;
}

/*播放/暂停按钮*/
.ai-wrap .ai-audio-control, .ai-wrap .ai-audio-control:focus{
    background-color: transparent;
    background: rgba( 255, 255, 255, 0.1);
    backdrop-filter: blur( 20px );
    -webkit-backdrop-filter: blur( 20px );
    border-radius: 50px;
    border: 1px solid rgba( 255, 255, 255, 0.3);
    /* 阴影 */
    box-shadow: 0 2px 20px rgba(208, 216, 222, 1);
}
.ai-wrap .ai-audio-control:hover, .ai-wrap .ai-btn:hover, .ai-wrap .ai-btn.ai-btn-active:hover{
    background: rgba( 255, 255, 255, 0.35);
}

/*控制按钮*/
.ai-wrap .ai-btn{
    background-color: transparent;
    background: transparent;
    border-radius: 10px;
    border: transparent;
}

/*循环播放按钮,选中状态*/
.ai-wrap .ai-btn.ai-btn-active{
    background-color:transparent;
}
.ai-wrap .ai-btn.ai-btn-active svg{
    fill: #66ccff;
}

/*音量条*/
.ai-wrap .ai-volume-bar {
    background-color: transparent;
    border-right: transparent;
}
.ai-wrap .ai-volume-bar:before {
    background-color: #b7eee7;
}
.ai-wrap .ai-volume-bar.ai-volume-bar-active:before{
    background-color: #d9f6f3;
}

/*进度条*/
.ai-wrap .ai-track-progress-bar{
    border-radius: 50px;
    background-color: #b8eee7;
}
.ai-wrap .ai-track-progress{
    border-radius: 50px;
    background-color: #66ccff;
}

/*滚动条*/
.ai-wrap .ai-scroll-wrap>div:last-child{
    background-color: #b5eee4;
}
.ai-wrap .ai-scroll-wrap>div:last-child div{
    background-color: #d9f6f3!important;
}
</style>

使用方法:


思路

<style>
.ai-wrap {
    background-color: #66ccff;
}
</style>

疑难杂症

如果想改的元素没有类名也没有id怎么办?

.ai-wrap .ai-scroll-wrap>div:last-child div {
    background-color: #f70f5d!important;
}
.ai-wrap .ai-scroll-wrap>div:last-child div {
    background-color: #66ccff!important;
}

  1. Frankloole说道:

    https://ozempic.art/# ozempic cost

  2. BarryPow说道:

    https://rybelsus.shop/# semaglutide tablets

  3. Jeremycot说道:

    rybelsus cost rybelsus cost semaglutide tablets

  4. BarryPow说道:

    https://rybelsus.shop/# buy semaglutide online

  5. HaroldDon说道:

    semaglutide online: semaglutide online – buy rybelsus online

  6. Nhà cái EE88说道:

    I’m more than happy to discover this website. I want to to thank you for ones time for this wonderful read!! I definitely really liked every bit of it and I have you book marked to see new information in your site.

  7. Nhà cái EE88说道:

    An impressive share! I have just forwarded this onto a co-worker who had been conducting a little research on this. And he in fact bought me dinner because I discovered it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanks for spending the time to discuss this issue here on your internet site.

  8. Ramonfrive说道:

    semaglutide cost: rybelsus price – buy semaglutide pills

  9. Frankloole说道:

    https://ozempic.art/# ozempic online

  10. kxngsroih说道:

    Leaked. Laparoscopy. Oblique. Easter. Son of sam. The white lotus. Trevi fountain. Nursing. https://81.200.117.113

  11. Ramonfrive说道:

    Ozempic without insurance: buy cheap ozempic – buy cheap ozempic

  12. HaroldDon说道:

    buy ozempic: ozempic coupon – ozempic coupon

  13. Jeremycot说道:

    ozempic online ozempic generic buy cheap ozempic

  14. BarryPow说道:

    http://ozempic.art/# Ozempic without insurance

  15. Frankloole说道:

    https://rybelsus.shop/# semaglutide online

  16. HaroldDon说道:

    buy semaglutide pills: semaglutide tablets – rybelsus price

  17. Ramonfrive说道:

    rybelsus pill: rybelsus cost – rybelsus cost

  18. itdzvnmkp说道:

    Cyborg. Kdka. What is a narcissist. Jc penny. Facebook.. Better call saul. Tortoise. Naomi osaka. Ridiculous. https://81.200.117.113

  19. Jeremycot说道:

    Ozempic without insurance ozempic cost ozempic coupon

  20. Ramonfrive说道:

    buy ozempic pills online: buy cheap ozempic – ozempic online

  21. Ho88说道:

    I like it when people come together and share thoughts. Great site, continue the good work.

  22. HaroldDon说道:

    rybelsus cost: buy rybelsus online – semaglutide tablets

  23. Frankloole说道:

    http://ozempic.art/# buy cheap ozempic

  24. Ho88说道:

    You’ve made some decent points there. I looked on the internet to find out more about the issue and found most individuals will go along with your views on this web site.

  25. Jeremycot说道:

    buy semaglutide pills semaglutide online rybelsus cost

  26. HaroldDon说道:

    rybelsus cost: buy rybelsus online – cheapest rybelsus pills

  27. Frankloole说道:

    http://ozempic.art/# ozempic cost

  28. Ramonfrive说道:

    buy rybelsus online: rybelsus price – buy semaglutide pills

  29. Ramonfrive说道:

    buy ozempic: Ozempic without insurance – ozempic

  30. Frankloole说道:

    http://rybelsus.shop/# buy semaglutide pills

  31. free cam sex说道:

    I have to thank you for the efforts you have put in writing this blog. I really hope to view the same high-grade content by you later on as well. In truth, your creative writing abilities has inspired me to get my own, personal blog now 😉

  32. Jeremycot说道:

    semaglutide tablets rybelsus price buy semaglutide online

  33. live sex chat说道:

    I love it when individuals come together and share ideas. Great site, keep it up.

  34. HaroldDon说道:

    ozempic cost: buy cheap ozempic – ozempic cost

  35. Jeremycot说道:

    ozempic generic ozempic online buy ozempic pills online

  36. Frankloole说道:

    http://rybelsus.shop/# buy rybelsus online

  37. Jeremycot说道:

    buy semaglutide pills rybelsus cost rybelsus cost

  38. Ramonfrive说道:

    buy rybelsus online: rybelsus price – semaglutide tablets

  39. Ramonfrive说道:

    rybelsus cost: rybelsus price – buy rybelsus online

  40. Frankloole说道:

    https://ozempic.art/# ozempic online

  41. Howdy, I do think your web site could be having web browser compatibility problems. Whenever I take a look at your website in Safari, it looks fine however when opening in Internet Explorer, it has some overlapping issues. I just wanted to give you a quick heads up! Apart from that, excellent site!

  42. HaroldDon说道:

    semaglutide tablets: buy semaglutide online – buy rybelsus online

  43. It’s hard to find experienced people in this particular topic, however, you seem like you know what you’re talking about! Thanks

  44. Jeremycot说道:

    rybelsus pill buy rybelsus online buy semaglutide online

  45. Jeremycot说道:

    buy cheap ozempic Ozempic without insurance ozempic cost

  46. Ramonfrive说道:

    rybelsus coupon: semaglutide cost – semaglutide online

发表回复

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