博客园设置背景音乐
CSS代码
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* 定制公告栏音乐插件的样式 */ .aplayer { font-family: Arial,Helvetica,sans-serif; /*音乐插件字体*/ margin: 0px; /*音乐插件与公告栏左边的边距,0px就是直接抵到公告栏左边的边上*/ box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12); border-radius: 2px; overflow: hidden; -webkit-user- select : none; -moz-user- select : none; -ms-user- select : none; user- select : none; line-height: normal; } |
博客侧边栏公告(支持HTML代码)(支持JS代码):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | <!-- 为博客底部添加音乐组件 --> <div id = "player" class= "aplayer" >< /div > <link href= "https://files.cnblogs.com/files/shwee/APlayer.min_v1.10.1.css" rel= "stylesheet" > <script src= "https://files.cnblogs.com/files/shwee/APlayer.min_v1.10.1.js" >< /script > <script type = "text/javascript" > var ap = new APlayer({ element: document.getElementById( 'player' ), narrow: false , autoplay: false , <!-- 是否自动播放 --> showlrc: false , theme: '#F5F5F5' , <!-- 插件背景颜色,建议和你的公告栏背景色一样,这样融为一体的感觉 --> music: [{ title: '音乐1' , author: 'Valentin' , url: 'https://files.cnblogs.com/files/shwee/Valentin-A_Little_Story.pdf' , pic: 'http://images.cnblogs.com/cnblogs_com/shwee/1218109/o_music_pic4.png' }, { title: '音乐2' , author: '林海' , url: 'https://files.cnblogs.com/files/shwee/%E6%9E%97%E6%B5%B7-%E7%90%B5%E7%90%B6%E8%AF%AD.pdf' , pic: 'http://images.cnblogs.com/cnblogs_com/shwee/1218109/o_music_pic1.png' }, { title: '音乐3' , author: '赵海洋' , url: 'https://files.cnblogs.com/files/shwee/%E8%B5%B5%E6%B5%B7%E6%B4%8B-%E3%80%8A%E7%9E%AC%E9%97%B4%E7%9A%84%E6%B0%B8%E6%81%92%E3%80%8B%E5%A4%9C%E8%89%B2%E9%92%A2%E7%90%B4%E6%9B%B2.pdf' , pic: 'http://images.cnblogs.com/cnblogs_com/shwee/1218109/o_music_pic2.png' } ] }); ap.init(); < /script > |
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步