HTML: Web sitesi arka planı olarak video - böylece çalışır
Web sitenizin arka planı olarak bir video gerçek bir göz alıcıdır. Bu pratik ipucunda, bir YouTube videosunu HTML kodu kullanarak nasıl yerleştireceğinize ilişkin talimatlar bulacaksınız.
HTML: Web sitesi arka planı olarak video - böylece çalışır
En kolay yol bir YouTube videosu kullanmaktır. YouTube kanalınızdan veya ücretsiz olarak kullanılabilecek bir videonuzu kullanın:
- Video iframe ile entegre edilir ve negatif bir z-endeksi değeri belirterek web sitesinin en düşük seviyesine ayarlanır. Metinleriniz ve diğer öğeleriniz ön plandadır ve bu nedenle hala görünür durumdadır. Bu kodla video otomatik olarak başlar, ancak ziyaretçileriniz bir tıklamayla durdurulabilir.
- Bu kodu başlık alanına kopyalayın: body {margin: 0; padding: 0;}. Ve etiketleri arasında olmalıdır.
- Bu kod arasında ve yeri:
- Şimdi yapmanız gereken tek şey "CBPF-2rCpME" YouTube video kimliğini istediğiniz videoyla değiştirmek.
- Kimliği bulmak için ilgili videoyu izleyin. Kimlik, adres çubuğundaki "//www.youtube.com/watch?v=" ifadesinin arkasındaki sayı ve harf dizisidir.
Bir sonraki makalede, YouTube kapalıyken neler yapabileceğinizi göstereceğiz.