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

/ 5,686评论 / 23813阅读 / 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. Lloydlania说道:

    https://furpharm.com/# furosemide fur pharm

  2. I was excited to find this page. I need to to thank you for your time for this fantastic read!! I definitely liked every part of it and i also have you saved as a favorite to look at new information on your web site.

  3. CurtisTraup说道:

    ED meds online ED meds online best ed pill ere pharm

  4. Lloydlania说道:

    http://rybpharm.com/# rybpharm rybelsus

  5. Raw garden说道:

    Way cool! Some very valid points! I appreciate you writing this post plus the rest of the website is also very good.

  6. DennisBob说道:

    GabaPharm: GabaPharm Gabapentin – buy gabapentin india

  7. CurtisTraup说道:

    ED pills non prescription erepharm.com erepharm pills

  8. DennisBob说道:

    buy gabapentin: buy gabapentin online – buy gabapentin online

  9. DennisBob说道:

    buy rybelsus: buy rybelsus – rybpharm cheap semaglutide

  10. Lloydlania说道:

    http://gabapharm.com/# buy gabapentin online

  11. Rosendale Dairy说道:

    After checking out a few of the blog articles on your blog, I honestly appreciate your technique of writing a blog. I bookmarked it to my bookmark website list and will be checking back soon. Take a look at my website too and let me know what you think.

  12. CurtisTraup说道:

    kampharm.shop cheapest Kamagra Kam Pharm kam pharm shop

  13. Robertmep说道:

    http://erepharm.com/# ED pills non prescription

  14. CurtisTraup说道:

    ED meds online best ed pills online ED meds online

  15. I’m amazed, I have to admit. Seldom do I come across a blog that’s equally educative and engaging, and let me tell you, you have hit the nail on the head. The issue is something not enough folks are speaking intelligently about. I’m very happy I stumbled across this in my hunt for something regarding this.

  16. DennisBob说道:

    rybpharm canada: semaglutide – buy rybelsus rybpharm

  17. DennisBob说道:

    kamagra: Kam Pharm – Kamagra Kam Pharm

  18. Lloydlania说道:

    https://kampharm.shop/# Kamagra Kam Pharm

  19. eco blankets说道:

    Hi there! Do you know if they make any plugins to help with SEO?

    I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good success.
    If you know of any please share. Thanks! You can read similar article here: Wool product

  20. CurtisTraup说道:

    buy rybelsus online usa buy rybelsus canada buy rybelsus

  21. 스키강습说道:

    Hi there! I just want to give you a huge thumbs up for the excellent information you’ve got here on this post. I’ll be coming back to your site for more soon.

  22. CurtisTraup说道:

    ED meds online with insurance best ed pill ere pharm erepharm.com

  23. DennisBob说道:

    kam pharm shop: kampharm.shop – Kamagra Kam Pharm

  24. DennisBob说道:

    best ed pill ere pharm: best ed pill ere pharm – erepharm.com

  25. CurtisTraup说道:

    fur pharm fur pharm buy lasix fur pharm

  26. Greetings! Very useful advice within this post! It’s the little changes that will make the most significant changes. Many thanks for sharing!

  27. Lloydlania说道:

    https://furpharm.com/# furosemide furpharm.com

  28. Robertmep说道:

    https://furpharm.com/# cheapest lasix

  29. CurtisTraup说道:

    buy lasix fur pharm furpharm furosemide

  30. DennisBob说道:

    erepharm pills: best ed pill ere pharm – ere pharm

  31. DennisBob说道:

    buy rybelsus rybpharm: buy rybelsus canada – buy rybelsus canada

  32. Lloydlania说道:

    https://furpharm.com/# cheapest lasix

  33. snaptik.icu说道:

    Everything is very open with a really clear explanation of the challenges. It was really informative. Your site is extremely helpful. Thanks for sharing!

  34. Your style is unique compared to other people I’ve read stuff from. I appreciate you for posting when you have the opportunity, Guess I’ll just bookmark this web site.

  35. CurtisTraup说道:

    best ed pill ere pharm ED meds online with insurance ED meds online with insurance

  36. Robertmep说道:

    http://rybpharm.com/# rybpharm rybelsus

  37. hookup sites说道:

    This blog was… how do I say it? Relevant!! Finally I’ve found something that helped me. Cheers!

  38. Lloydlania说道:

    https://erepharm.com/# best ed pill ere pharm

  39. tiktok download说道:

    Hello there, I do believe your web site could be having internet browser compatibility problems. When I take a look at your blog in Safari, it looks fine however, if opening in I.E., it’s got some overlapping issues. I simply wanted to provide you with a quick heads up! Apart from that, wonderful blog.

  40. Contact us说道:

    Hi, I do believe this is an excellent web site. I stumbledupon it 😉 I may return yet again since I saved as a favorite it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.

  41. CurtisTraup说道:

    furpharm buy lasix fur pharm furosemide fur pharm

  42. DennisBob说道:

    gabapentin GabaPharm: Buy gabapentin for humans – buy gabapentin online

  43. Lloydlania说道:

    http://rybpharm.com/# buy rybelsus rybpharm

  44. DennisBob说道:

    buy gabapentin: GabaPharm – Buy gabapentin for humans

  45. PSAT Exam说道:

    bookmarked!!, I love your blog.

发表回复

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