如何将视频标签定位在固定位置?(How do I position a video tag in a fixed position?)
我有以下视频标签:
<video width="640" height="480" controls id="mainVideo" name="mainVideo"> <source src="video.mp4" type="video/mp4"> Your browser does not support the video tag. </video>我想将它放在浏览器屏幕的右上角,无论窗口滚动的位置如何(意味着视频保持在顶部)。
I have the following video tag:
<video width="640" height="480" controls id="mainVideo" name="mainVideo"> <source src="video.mp4" type="video/mp4"> Your browser does not support the video tag. </video>and I would like to position it on the top right of the browser's screen, irregardless of where the window scroll is (meaning, the video stays on top).
最满意答案
尝试这个...
#mainVideo{ position:fixed; right:0; top:0; }Try this...
#mainVideo{ position:fixed; right:0; top:0; }更多推荐
发布评论