为博客添加网易云音乐播放器外链

Step 1

找到网易云音乐网页版官网, 获取外链(注意先获取iframe形式再将iframe改为embed)

<embed frameborder="no" border="0" marginwidth="0" marginheight="0" width=298 height=52 src="//music.163.com/outchain/player?type=2&id=574587013&auto=1&height=32"></embed>

Step 2

打开设置 --- 页首HTML代码 --- 粘贴
修改一下 id可以设置css效果, 选择合适的位置摆放, 设置透明度等:

<embed id="musicplayer" frameborder="no" border="0" marginwidth="0" marginheight="0" width=298 height=52 src="//music.163.com/outchain/player?type=2&id=574587013&auto=1&height=32"></embed>

Step 3

在设置 --- 页面定制CSS代码中加入如下内容(设置CSS样式) : 我这里选择把他摆放在左下角

#musicplayer {
    position: fixed;
    bottom: 10px;
    left: 5px;
    opacity: 0.7;
    z-index: 999;
}

然后就完成了, 效果 :

posted @ 2020-06-06 23:23  roccoshi  阅读(738)  评论(0编辑  收藏  举报