video标签里面不是全屏
时间: 2023-09-09 09:13:55 浏览: 132
回答: 如果想让video标签内的视频不全屏播放,可以使用以下方法:
方法一: 在video标签内添加playsinline属性。例如:
<video id="video1" playsinline>
<source src="video.mp4" type="video/mp4">
</video> [1]
方法二: 在video标签内添加webkit-playsinline属性。例如:
<video id="video1" webkit-playsinline>
<source src="video.mp4" type="video/mp4">
</video> [1]
方法三: 在video标签内添加x5-playsinline属性。例如:
<video id="video1" x5-playsinline>
<source src="video.mp4" type="video/mp4">
</video> [1]
以上方法中的playsinline属性或webkit-playsinline属性或x5-playsinline属性可以告诉浏览器在小窗模式下播放视频,而不是全屏模式。请根据自己的需求选择其中一种方法进行设置。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [h5使用video标签解决自动全屏问题](https://blog.csdn.net/qq_24978681/article/details/117230378)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [html5 video标签实现手机端视频播放全屏显示](https://blog.csdn.net/suny2020/article/details/120021983)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文