Heading
Lorem ipsum...
ਪੂਰੇ ਸਕਰੀਨ ਵਿਡੀਓ ਪਿਨਡਬੈਕ ਕਿਵੇਂ ਬਣਾਓ ਸਿੱਖੋ ਕਿਵੇਂ ਕੀਤਾ ਜਾਂਦਾ ਹੈ ਕਿਵੇਂ ਕੀਤਾ ਜਾਂਦਾ ਹੈ
ਪੂਰੇ ਬਰਾਊਜ਼ਰ ਵਿੰਡੋ ਨੂੰ ਕਵਰ ਕਰਨ ਵਾਲੇ ਵਿਡੀਓ ਪਿਨਡਬੈਕ ਕਿਵੇਂ ਬਣਾਓ ਸਿੱਖੋ:
<!-- 视频 --> <video autoplay muted loop id="myVideo"> <source src="rain.mp4" type="video/mp4">Heading
Lorem ipsum...
/* 设置视频样式:100% 宽度和高度以覆盖整个窗口 */ #myVideo { position: fixed; right: 0; bottom: 0; min-width: 100%; min-height: 100%; } /* 在视频/页面底部添加一些内容 */ .content { position: fixed; bottom: 0; background: rgba(0, 0, 0, 0.5); color: #f1f1f1; width: 100%; padding: 20px; } /* 设置用于暂停/播放视频的按钮的样式 */ #myBtn { width: 200px; font-size: 18px; padding: 10px; border: none; background: #000; color: #fff; cursor: pointer; } #myBtn:hover { background: #ddd; color: black; }
ਜਾਂ ਤਾਂ ਤੁਸੀਂ ਜਸਟਿਸ ਜਸਟ ਕਲਿੱਕ ਕਰਕੇ ਵੀਡੀਓ ਸਾਲਪ/ਪਲੇਬੈਕ ਕਰ ਸਕਦੇ ਹੋ
<script> // ਵੀਡੀਓ ਪ੍ਰਾਪਤ ਕਰੋ var video = document.getElementById("myVideo"); // ਬਟਨ ਪ੍ਰਾਪਤ ਕਰੋ var btn = document.getElementById("myBtn"); // ਸਾਲਪ ਅਤੇ ਪਲੇਬੈਕ ਵੀਡੀਓ ਅਤੇ ਬਟਨ ਟੈਕਸਟ ਬਦਲੋ function myFunction() { if (video.paused) { video.play(); btn.innerHTML = "Pause"; } video.pause(); btn.innerHTML = "Play"; } }