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

/ 4,437评论 / 17614阅读 / 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. Robertperma说道:

    buy zithromax without presc buy generic zithromax no prescription zithromax generic price

  2. LewisToite说道:

    http://propeciabestprice.pro/# buying propecia price

  3. LewisToite说道:

    https://nolvadexbestprice.pro/# where to buy nolvadex

  4. PatrickHindy说道:

    https://nolvadexbestprice.pro/# tamoxifen citrate pct

  5. Matthewnouts说道:

    tamoxifen blood clots: nolvadex d – tamoxifen breast cancer

  6. PatrickHindy说道:

    https://propeciabestprice.pro/# cost propecia without prescription

  7. Robertperma说道:

    prednisone 7.5 mg prednisone best price prednisone online australia

  8. Matthewnouts说道:

    liquid tamoxifen: nolvadex price – tamoxifen lawsuit

  9. Robertperma说道:

    cost cheap propecia price buy propecia without prescription cost cheap propecia online

  10. LewisToite说道:

    https://propeciabestprice.pro/# cost cheap propecia without dr prescription

  11. PatrickHindy说道:

    https://propeciabestprice.pro/# get propecia without rx

  12. Robertperma说道:

    purchase cytotec buy misoprostol over the counter Abortion pills online

  13. Matthewnouts说道:

    zithromax drug: zithromax tablets for sale – zithromax 500 mg lowest price online

  14. Slot说道:

    An intriguing discussion is definitely worth comment. I think that you ought to publish more about this topic, it might not be a taboo subject but generally folks don’t speak about these topics. To the next! Kind regards.

  15. Waynetar说道:

    buying prescription drugs in mexico online: best online pharmacies in mexico – reputable mexican pharmacies online

  16. NelsonSaIlk说道:

    buying from online mexican pharmacy: mexican drugstore online – mexico pharmacies prescription drugs

  17. CASINO5588说道:

    A fascinating discussion is worth comment. There’s no doubt that that you ought to publish more about this issue, it might not be a taboo subject but usually people don’t discuss these issues. To the next! All the best!

  18. NelsonSaIlk说道:

    best online pharmacies in mexico: mexican pharmaceuticals online – mexican drugstore online

  19. Arnoldscava说道:

    mexican mail order pharmacies mexican pharmaceuticals online mexican online pharmacies prescription drugs

  20. DominicHOr说道:

    mexico drug stores pharmacies: best online pharmacies in mexico – medicine in mexico pharmacies

  21. Great info. Lucky me I ran across your blog by chance (stumbleupon). I’ve book marked it for later.

  22. Arnoldscava说道:

    mexico drug stores pharmacies medication from mexico pharmacy mexican online pharmacies prescription drugs

  23. Waynetar说道:

    mexican drugstore online: mexico drug stores pharmacies – medicine in mexico pharmacies

  24. Waynetar说道:

    mexican drugstore online: pharmacies in mexico that ship to usa – reputable mexican pharmacies online

  25. NelsonSaIlk说道:

    buying prescription drugs in mexico: best online pharmacies in mexico – best online pharmacies in mexico

  26. NelsonSaIlk说道:

    mexican drugstore online: mexican online pharmacies prescription drugs – best online pharmacies in mexico

  27. DominicHOr说道:

    mexico drug stores pharmacies: mexican pharmaceuticals online – mexico drug stores pharmacies

  28. Arnoldscava说道:

    mexican online pharmacies prescription drugs purple pharmacy mexico price list medication from mexico pharmacy

  29. DominicHOr说道:

    mexico drug stores pharmacies: mexican online pharmacies prescription drugs – buying prescription drugs in mexico

  30. Arnoldscava说道:

    medication from mexico pharmacy mexican online pharmacies prescription drugs medicine in mexico pharmacies

  31. Waynetar说道:

    mexican drugstore online: mexican mail order pharmacies – reputable mexican pharmacies online

  32. Waynetar说道:

    buying prescription drugs in mexico: mexican border pharmacies shipping to usa – best online pharmacies in mexico

  33. NelsonSaIlk说道:

    best online pharmacies in mexico: mexican mail order pharmacies – medication from mexico pharmacy

  34. DominicHOr说道:

    reputable mexican pharmacies online: mexican pharmaceuticals online – buying prescription drugs in mexico online

  35. NelsonSaIlk说道:

    reputable mexican pharmacies online: mexican mail order pharmacies – buying prescription drugs in mexico online

  36. Arnoldscava说道:

    mexican online pharmacies prescription drugs best online pharmacies in mexico buying prescription drugs in mexico

  37. DominicHOr说道:

    п»їbest mexican online pharmacies: medication from mexico pharmacy – mexican border pharmacies shipping to usa

  38. Arnoldscava说道:

    pharmacies in mexico that ship to usa medicine in mexico pharmacies mexican mail order pharmacies

  39. Waynetar说道:

    buying from online mexican pharmacy: best online pharmacies in mexico – best online pharmacies in mexico

  40. Waynetar说道:

    mexican drugstore online: reputable mexican pharmacies online – mexico drug stores pharmacies

  41. NelsonSaIlk说道:

    pharmacies in mexico that ship to usa: mexico pharmacies prescription drugs – mexican rx online

  42. DominicHOr说道:

    mexico drug stores pharmacies: mexico drug stores pharmacies – buying from online mexican pharmacy

  43. Arnoldscava说道:

    buying prescription drugs in mexico mexican drugstore online buying from online mexican pharmacy

  44. DominicHOr说道:

    mexican mail order pharmacies: buying from online mexican pharmacy – pharmacies in mexico that ship to usa

  45. NelsonSaIlk说道:

    mexican border pharmacies shipping to usa: purple pharmacy mexico price list – buying prescription drugs in mexico online

  46. Arnoldscava说道:

    medicine in mexico pharmacies mexican pharmacy buying prescription drugs in mexico

  47. Waynetar说道:

    pharmacies in mexico that ship to usa: mexican pharmaceuticals online – purple pharmacy mexico price list

  48. Waynetar说道:

    mexican pharmaceuticals online: mexican drugstore online – medicine in mexico pharmacies

  49. DominicHOr说道:

    mexican border pharmacies shipping to usa: buying prescription drugs in mexico – mexican pharmaceuticals online

  50. Arnoldscava说道:

    purple pharmacy mexico price list mexico drug stores pharmacies п»їbest mexican online pharmacies

发表回复

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