F12打开浏览器console
粘贴
box = document.getElementsByClassName(‘player’)[0]
box.style.transform = ‘rotate(90deg)’;
回车
其中90是顺时针旋转的度数,可以改成180,270等
我这里上面的不能用了
document.querySelector(".bilibili-player-video").style.transform = “rotate(-90deg)”;
现在这个还可以使用
B站天天更新吗?上面又不能用了
document.querySelector(.bilibili-player-video).style.transform = rotate(-90deg)
好像不是不能用了,可能是缓存的问题
本文介绍了如何使用JavaScript修改B站播放器视频的旋转角度,通过`document.querySelector`选择器设置视频元素的transform属性实现旋转。同时,讨论了可能遇到的缓存问题及其解决方案,提醒读者注意刷新或清除缓存以确保代码正常运行。
1856





