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

/ 4,266评论 / 15977阅读 / 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. iptv说道:

    Great info. Lucky me I recently found your blog by chance (stumbleupon). I have book marked it for later!

  2. iptv说道:

    Hi, I do think this is a great web site. I stumbledupon it 😉 I’m going to come back once again since I book marked it. Money and freedom is the greatest way to change, may you be rich and continue to guide others.

  3. Jamesjer说道:

    buy doxycycline 200 mg: can you buy doxycycline over the counter canada – 10 mg doxycycline

  4. Jamesjer说道:

    where to buy clomid online: clomid brand name – can i purchase cheap clomid without rx

  5. iptv说道:

    It’s hard to find knowledgeable people in this particular topic, but you seem like you know what you’re talking about! Thanks

  6. ThomasInace说道:

    http://amoxildelivery.pro/# buy amoxicillin 500mg capsules uk

  7. iptv说道:

    Great article. I’m experiencing some of these issues as well..

  8. ThomasInace说道:

    https://clomiddelivery.pro/# can i buy clomid without rx

  9. ThomasInace说道:

    http://doxycyclinedelivery.pro/# doxycycline india price

  10. ThomasInace说道:

    http://amoxildelivery.pro/# amoxicillin online canada

  11. Jamesjer说道:

    cost of amoxicillin: amoxicillin without a prescription – amoxicillin 500mg

  12. sex说道:

    Way cool! Some very valid points! I appreciate you writing this article and also the rest of the site is also very good.

  13. Jamesjer说道:

    buy generic ciprofloxacin: buy cipro online canada – п»їcipro generic

  14. memek说道:

    Great post. I am facing many of these issues as well..

  15. ThomasInace说道:

    https://doxycyclinedelivery.pro/# where can i buy doxycycline no prescription

  16. ThomasInace说道:

    http://paxloviddelivery.pro/# paxlovid pharmacy

  17. Mushroom gummies说道:

    I want to to thank you for this wonderful read!! I certainly loved every bit of it. I have you saved as a favorite to look at new stuff you post…

  18. Mushroom gummies说道:

    It’s nearly impossible to find knowledgeable people about this subject, however, you seem like you know what you’re talking about! Thanks

  19. Jamesjer说道:

    ciprofloxacin 500mg buy online: cipro online no prescription in the usa – buy cipro online without prescription

  20. ThomasInace说道:

    http://clomiddelivery.pro/# how to buy cheap clomid

  21. Jamesjer说道:

    doxycycline for sale usa: doxycycline 100mg tablet brand name – doxycycline prescription uk

  22. It’s difficult to find educated people on this subject, however, you seem like you know what you’re talking about! Thanks

  23. ThomasInace说道:

    https://ciprodelivery.pro/# cipro ciprofloxacin

  24. vents说道:

    I really like it when individuals come together and share ideas. Great site, stick with it!

  25. link bokep说道:

    The very next time I read a blog, I hope that it doesn’t disappoint me just as much as this one. I mean, I know it was my choice to read through, but I genuinely thought you’d have something useful to talk about. All I hear is a bunch of complaining about something that you can fix if you were not too busy seeking attention.

  26. sex说道:

    I’d like to thank you for the efforts you have put in penning this site. I really hope to see the same high-grade content from you later on as well. In fact, your creative writing abilities has encouraged me to get my very own blog now 😉

  27. ThomasInace说道:

    http://clomiddelivery.pro/# where can i buy cheap clomid pill

  28. 백링크 확인说道:

    You’ve offered a unique perspective here.검색엔진최적화 업체

  29. Jamesjer说道:

    order cheap clomid without rx: how to buy cheap clomid no prescription – can you get clomid price

  30. EdwardKib说道:

    https://canadapharmast.com/# canadian pharmacy 24

  31. Michaelpiepe说道:

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

  32. EdwardKib说道:

    http://indiapharmast.com/# online shopping pharmacy india

  33. DavidWaype说道:

    best online canadian pharmacy: canadian pharmacy review – canadian medications

  34. DavidWaype说道:

    mexican border pharmacies shipping to usa: mexican rx online – medicine in mexico pharmacies

  35. You made some decent points there. I looked on the net for more info about the issue and found most individuals will go along with your views on this web site.

  36. Charlestaf说道:

    best canadian pharmacy to buy from best canadian pharmacy to order from best canadian pharmacy

  37. DavidWaype说道:

    indian pharmacies safe: pharmacy website india – cheapest online pharmacy india

  38. Kissimmee说道:

    After checking out a handful of the articles on your website, I truly appreciate your way of blogging. I saved it to my bookmark website list and will be checking back in the near future. Please visit my website as well and tell me your opinion.

  39. DavidWaype说道:

    india pharmacy mail order: best india pharmacy – indian pharmacies safe

  40. Michaelpiepe说道:

    best india pharmacy: india pharmacy mail order – top online pharmacy india

  41. Charlestaf说道:

    mexico pharmacies prescription drugs buying prescription drugs in mexico online pharmacies in mexico that ship to usa

  42. DavidWaype说道:

    mexico pharmacies prescription drugs: mexican rx online – medication from mexico pharmacy

  43. DavidWaype说道:

    mexican rx online: buying prescription drugs in mexico online – purple pharmacy mexico price list

  44. EdwardKib说道:

    https://indiapharmast.com/# indian pharmacies safe

  45. EdwardKib说道:

    https://canadapharmast.online/# canadian compounding pharmacy

  46. Charlestaf说道:

    vipps approved canadian online pharmacy canadian drugs pharmacy canadian drug pharmacy

  47. DavidWaype说道:

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

发表回复

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