2016-11-15 2 views
-2

Ich versuche, zwei Videos mit Steuerelementen nebeneinander anzuzeigen, aber ich kann nicht scheinen, damit es funktioniert. Ich kann einen von ihnen haben, aber nicht den anderen. Ich habe es ausprobiert, wenn ich die Datei falsch anwähle, aber nein, alles scheint sich auszuprobieren.HTML5: Wie bekomme ich 2 Videos auf der gleichen Seite?

@fontface { 
 
    font-family: Halo; 
 
    src: url(fonts/Halo.ttf); 
 
} 
 
body { 
 
    background-image: url(images/background-image/ExuberantWitness.jpg); 
 
    -webkit-background-size: cover; 
 
    -moz-background-size: cover; 
 
    -o-background-size: cover; 
 
    background-size: cover; 
 
} 
 
#head { 
 
    font-family: Halo; 
 
    font-size: 60px; 
 
    text-align: center; 
 
} 
 
.leftVideo { 
 
    margin: 0 auto; 
 
    width: 600px; 
 
    float: left; 
 
} 
 
.rightVideo { 
 
    margin: 0 auto; 
 
    width: 600px; 
 
    float: left; 
 
}
<!doctype HTML> 
 
<html> 
 

 
<head> 
 
    <title>HaloPLAY</title> 
 
    <link href="Trailer.css" rel="stylesheet" type="text/css"> 
 
    <meta charset="utf-8"> 
 
</head> 
 

 
<body> 
 
    <a href="index.html"> 
 
    <img style="margin: 0px auto;display:block" src="images/title/Halo.jpg" width="750" height="100"> 
 
    </a> 
 
    <h1 id="head">WATCH THE TRAILER TO LEARN MORE</h1> 
 
    <div class="leftVideo"> 
 
    <video width="500" height="350" controls> 
 
     <source src="video/Halo5Trailer.mp4" type="video/mp4"> 
 
     <source src="video/Halo5Trailer.ogg" type="video/ogg"> 
 
      </class> 
 
      <div class="rightVideo"> 
 
      <video width="500" height="350" controls> 
 
       <source src="video/Halo5Trailer2.mp4" type="video/mp4"> 
 
       <source src="video/Halo5Trailer2.ogg" type="video/ogg"> 
 
        </class> 
 
</body> 
 

 
</html>

Antwort

0

ändern

</class> 

Um

</video> 
0

es scheint, dass Sie nicht geschlossene Tags haben und schließt ein Tag, das </class> exsist tut.

es so versuchen:

<div class="leftVideo"> 
    <video width="500" height="350" controls> 
    <source src="video/Halo5Trailer.mp4" type="video/mp4"> 
    <source src="video/Halo5Trailer.ogg" type="video/ogg"> 
    </video> 
</div> 
<div class="rightVideo"> 
    <video width="500" height="350" controls> 
    <source src="video/Halo5Trailer2.mp4" type="video/mp4"> 
    <source src="video/Halo5Trailer2.ogg" type="video/ogg"> 
    </video> 
</div> 

Bitte hier http://www.w3schools.com/html/html5_video.asp für weitere Informationen.

Gruß,

Alex

Verwandte Themen