Insert HTML5 videos, can I insert videos of different sizes in an area with a specific size (ex. width: 600, height: 600) on one screen?

Asked 2 years ago, Updated 2 years ago, 103 views

Hello, I am a developer with experience in programming languages.

I'm studying the website, but I'm a beginner, so I often ask simple questions. ;

;;

Just as HTML5 map tags allow you to link to a desired location,

I want to place the video in the desired location.

Like the picture above...

Is there any way to use html5 tag, css, jquery, etc.?

html5 location video

2022-09-22 15:37

1 Answers

If it were me, I'd go with css purely.

Give wrapper div, position:relative; attribute I'm going to make a sub-div, and I'm going to make a video play element Position position:absolute; in the lower division of the wrapper division.

Example)

<div id="wrapper">                       // <-  position:relative;
  <div id="firstVideo"></div>       //   <-  position:absolute;
  <div id="secondVideo"></div> //  <-  position:absolute;
  <div id="lastVideo"></div>       //  <-  position:absolute;
</div>

Although position:absolute; is an unwilling way, Here's the "easy" way to show it to a specific location~

However, you should be careful because it can break on the responsive web.

Below, I put the YouTube link in iframe as an example. Even if it is a <video> element supported by html5, it surrounds it Since I give a position in the division, I think there will be no problem.

https://jsfiddle.net/arclien/z19y3Lkz/


2022-09-22 15:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.