Using video instead of static slides in HTML5

I am interested in adding a video background with text overlay on my website, similar to what can be seen here:

Although I understand it involves CSS, I am struggling to achieve the desired effect. Here is the code snippet I have been using:

video#bgvid { 
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
-ms-transform: translateX(-50%) translateY(-50%);
-moz-transform: translateX(-50%) translateY(-50%);
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
background-size: cover;

}

While this CSS creates a full background video, I am aiming for an effect more like animoto.com.

Answer №1

I want to express my gratitude to everyone, I was able to solve the issue by adjusting the video's width to 100% for a more fluid display.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Having trouble getting your Raspberry Pi web server to display the background image?

Recently, I successfully set up a LAMP server on my raspberrypi which was quite exciting. One of the first things I did was configure an FTP server to transfer webpage files to the Pi. I managed to create a basic form of the final webpage and transferred i ...

Guide to correctly passing custom parameters along with the event object to an asynchronous form submission handler

Asking for guidance on defining and typing custom parameters alongside the native event object in an async onSubmitHandler for a form. The current implementation only receives the native event as a single parameter: const onSubmitHandler: FormEventHa ...

Is there a way to replicate this modal effect on a WordPress website?

I am looking to replicate the functionality I have seen on . When clicking on the mail icon in their navigation bar, it opens a modal form displaying an existing section from the homepage. Is there a way to achieve this without using plugins? However, sug ...

Can the jQuery Cycle Plugin: scrollHorz with Prev/Next automatically scroll without any input from the user?

Currently implementing the jQuery cycle plugin: jquery.cycle.all.min.js - newest version (2.8.8) available at http://malsup.com/jquery/cycle/ The scrollHorz effect is being used with previous and next links, functioning perfectly except for one issue: upo ...

Ways to retrieve dropdown values

My HTML code is as follows: <select class="height_selected"> <option>Select Height</option> <option ng-model="userHeight" ng-init="1" value="1">123 cm</option> <option ng-model="userHeight" ng-init="2" v ...

While attempting to encrypt a private key in JavaScript using dotenv, I encountered an issue: TypeError - I was unable to read properties of undefined, specifically 'toHexString'

Welcome to encrypt.js const ethers = require("ethers"); const fs = require("fs-extra"); require("dotenv").config(); async function main() { const wallet = new ethers.Wallet(process.env.RRIVATE_KEY); const encryptedJsonKey ...

Generating HTML content using JavaScript

Having trouble displaying an iframe on my page using javascript and html. I've made a mistake in the javascript and need assistance with getting the html to show up on the page. The iframe is not appearing and I suspect my function call is incorrect. ...

A guide to iterating over an array and displaying individual elements in Vue

In my application, there is a small form where users can add a date with multiple start and end times which are then stored in an array. This process can be repeated as many times as needed. Here is how the array structure looks: datesFinal: {meetingName: ...

What steps do I need to follow to write this function in TypeScript?

I am encountering a problem when building the project where it shows errors in 2 functions. Can someone please assist me? The first error message is as follows: Argument of type 'IFilmCard[] | undefined' is not assignable to parameter of type &a ...

After inviting the bot, I would like to directly message the server owner

Currently, I am searching for a solution to enable my bot to send a message to the owner of the server it has been added to. While exploring various stackoverflow responses, I came across code snippets that closely resembled the following: client.on(' ...

What could be causing the issue of only the title being visible and not the content in Next.js when using next-mdx-remote?

I am having an issue with rendering MDX content on a page using next-mdx-remote with Next.js. Currently, only the title from the frontmatter is being displayed, while the actual MDX content is not showing up. Below is the code snippet showcasing my setup: ...

Ways to apply a border-bottom to tr elements without affecting td elements

Is there a way to add a bottom border to <tr> elements without affecting <td> cells that have no border? I attempted the following approach, but setting border: 0 for <td> overrides the border for all <tr> elements as well, leaving ...

AngularJS dynamically creates an HTML template that includes an `ng-click` attribute calling a function with an argument

Struggling to create an HTML template using an AngularJS directive, the issue arises when trying to pass an object into a function within one of the generated elements. Here is the directive code in question: app.directive('listObject', function ...

Proper positioning of try/catch block in scenarios involving delayed async/await operations

For the past six months, I have been utilizing async/await and have truly enjoyed the convenience it provides. Typically, I adhere to the traditional usage like so: try { await doSomethingAsync() } catch (e) {} Lately, I've delved into experimenti ...

What is the best way to determine if an application has been installed on an Android device while browsing a website?

Let's set the scene: I've got a website that needs to use JavaScript to determine whether my app is already installed on the android device it's currently being used on. If the app is installed, the page will display a link (with a custom ...

Utilizing navigation buttons to move between tabs - material-ui (version 0.18.7)

I'm currently using material ui tabs and attempting to incorporate back and next buttons for tab navigation. However, I've run into an issue - when I click the back or next buttons, the tabs do not switch. Here is my existing code snippet: ... ...

Generating HTML content using JavaScript object data

I have a JavaScript file that holds data in the form of objects : let restaurant_A = { name: "BBQ place", min_order: 20, delivery_charge: 5, menu: { //First category "Appetizers": { //First it ...

Generate interactive jQuery slideToggle containers that monitor user clicks via Google Analytics

I have been working on a PHP and mySql project where I need to retrieve a list of businesses from a database. Once I have the desired businesses, I want to display them consecutively inside their own "clickDiv" container using jQuery slideToggle to reveal ...

Universal Navigation Search Component for Vue Router

Just starting out with Vue and frontend development. I'm attempting to create a universal navigation bar in Vue Router using bootstrap vue, complete with a search bar feature. However, because I have placed my navigation bar in App.vue, I am encount ...

performing a query on two tables with sequelize

There must be a more efficient way to accomplish this task with fewer lines of code. I am not very experienced with databases and I am new to sequelize and node. The user id is passed as a parameter and I need to check if there is a corresponding user in ...