如何更改ArtPlayer播放器中的字幕大小
#4488
-
Please make sure of the following things
Description of the feature / 需求描述环境:Docker版 [v3.17.0] 描述:使用内置ArtPlayer播放视频,字幕为同名vtt格式,全屏后字幕字体过小,未找到可对此字幕生效的设置及方法,Docker容器内部未找到视频播放器相关的配置文件。 需求:一个可行的对字幕大小格式进行干涉的方法,或者使用非Docker模式可以在对应的视频播放器配置文件处设置吗?未使用非Docker版进行测试。 |
Beta Was this translation helpful? Give feedback.
Answered by
xhofe
May 27, 2023
Replies: 2 comments 1 reply
-
|
https://alist.nn.ci/zh/config/global.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%A4%B4%E9%83%A8 <style>
.art-subtitle {
font-size: 50px !important;
}
</style> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Ciccaba
-
|
<style>
.art-video-player {
container-type: inline-size;
}
.art-subtitle {
font-size: clamp(18px, 4cqw, 80px) !important;
line-height: 1.4 !important;
text-shadow: 0 0 2px rgba(0,0,0,1), 0 2px 5px rgba(0,0,0,0.8) !important;
bottom: 40px !important;
}
/* 手机竖屏时的微调 (竖屏时宽度窄,稍微加大比例到 5.5%) */
@container (aspect-ratio < 1/1) {
.art-subtitle {
font-size: clamp(16px, 5.5cqw, 50px) !important;
}
}
</style>
可以用这段自适应的代码 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://alist.nn.ci/zh/config/global.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%A4%B4%E9%83%A8