我想删除或更改字幕的背景。我已经更改了背景颜色和背景,但它不起作用。背景可以改变吗?
::cue {
color: red;
background-color: blue; //or background: blue;
}
字幕颜色变为红色,但背景完全没有变化
最佳答案
我尝试了以下方法:
::cue {
color: red;
// take an absurd big outline, because background is only behind the text
outline: 500px solid blue;
// dont know why background-color is not working but background-image does the job
background-image: linear-gradient(blue, blue);
}
关于html5-video - 我可以在 html5 中删除或更改背景颜色字幕/webvtt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68723769/