2016-07-13 2 views
2

내 웹 사이트에 그래픽을 만들려는데 http://176.32.230.43/testdigitalmarketingmentor.co.uk/ 비디오가 랩톱 사진 내에서 재생되는 곳입니다 (비디오가 랩톱에서 재생되는 것처럼 보입니다). 화면). 또한 모바일 반응 (화면 크기에 따라 다시 크기 조정)을 원합니다. "Showreel"로 스크롤하여 아래의 CSS와 HTML로 지금까지 내가 무엇을 관리했는지 볼 수 있습니다 ... 어떤 도움/조언 /지도도 감사하겠습니다!css 및 html로 이미지 위에 비디오 삽입하기

#laptop-panel { 
 
     position: relative; 
 
     width: auto; 
 
     height: 625px; 
 
     overflow: hidden; 
 
    } 
 

 
    #laptop-panel-tv { 
 
     position: absolute; 
 
     top: 0; 
 
     left: 0; 
 
     width: 100%; 
 
     height: 100%; 
 
     background: url('http://176.32.230.43/testdigitalmarketingmentor.co.uk/wp-content/uploads/2016/07/laptop-1000x728-trans.png') no-repeat center; 
 
    z-index: 10; 
 
    } 
 

 
    #laptop-panel-content-overlay { 
 
     position: absolute; 
 
     top: 70px; 
 
     width: 100%; 
 
     height: 444px; 
 
     z-index: 12; 
 

 
    .embed-container { 
 
     position: relative; 
 
     padding-bottom: 56.25%; 
 
     padding-top: 30px; 
 
     height: 0; 
 
     overflow: hidden; 
 
     max-width: 100%; 
 
     height: auto; 
 
     } 
 
.video-container { 
 
    position: relative; 
 
    padding-bottom: 56.25%; 
 
    padding-top: 30px; height: 0; overflow: hidden; 
 
} 
 
    
 
.video-container iframe, 
 
.video-container object, 
 
.video-container embed { 
 
    position: absolute; 
 
    top: 0; 
 
    left: 0; 
 
    width: 100%; 
 
    height: 100%; 
 
}
<div id="laptop-panel"> 
 
    <div id="laptop-panel-tv"></div> 
 
    <div id="laptop-panel-content-overlay"> 
 
    <div id="laptop-panel-content"> 
 
     <div class="embed-container"> 
 
     <div style="width: 683px; " class="wp-video"> 
 
<!--[if lt IE 9]> <script>document.createElement('video');</script><![endif]--> 
 

 
    <div class="video-container"> 
 
<iframe src="https://www.youtube.com/embed/BhEWkcyXYwg?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe> 
 
    </div></div></div>    
 
    </div> 
 
</div>

This is what it looks like...

+0

뭐가 문제입니까? –

+0

동영상이 웹 사이트에 표시되지 않고 재생 버튼이있는 블랙 박스 일 뿐이며 클릭 할 때 아무 것도하지 않습니다. –

+0

문제는 플레이어가 처리중인 MIME 형식과 관련이있는 것으로 보입니다. YouTube 플레이어에 기본 html5 속성을 포함시키지 않는 이유는 무엇입니까? https://support.google.com/youtube/answer/171780?hl=ko –

답변

1

당신은 같은 것을 사용 괜찮을까요? 또한 YouTube에서 더 많은 조회수를 얻는 데 도움이됩니다. 코딩

#laptop-panel { 
 
     position: relative; 
 
     padding-top: 25px; 
 
     padding-bottom: 67.5%; 
 
     height: 0; 
 
    } 
 
    #laptop-panel iframe { 
 
     box-sizing: border-box; 
 
     background: url(http://176.32.230.43/testdigitalmarketingmentor.co.uk/wp-content/uploads/2016/07/laptop-1000x728-trans.png) center center no-repeat; 
 
     background-size: contain; 
 
     padding: 11.7% 17.9% 15.4%; 
 
     position: absolute; 
 
     top: 0; 
 
     left: 0; 
 
     width: 100%; 
 
     height: 100%; 
 
    }
<div id="laptop-panel"> 
 
     <iframe src="https://www.youtube.com/embed/BhEWkcyXYwg?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe> 
 
    </div>

해피!

+0

나는 이것을 시험해 보았지만 아무 것도 바뀌지 않는 것 같아 ... 나는 여전히 재생 아이콘이있는 블랙 박스를 얻었지만 클릭 할 때 아무 것도하지 않는다. 내 캐시를 지우려고했지만 아무런 차이가 없었습니다 ... 어떤 아이디어? –

+0

펜을 만들었습니다. 이것을 확인할 수 있습니까? http://codepen.io/IsabelInc/pen/wWPQxw –

+0

위대한 작품, 어떤 생각이 어떻게 모바일 반응이 있도록? 당신의 도움은 많이 감사합니다, 감사합니다! –

관련 문제