수평 가변 세로 고정으로 Youtube를 배경 동영상으로 만드는 방법
01 YTPlayer 사용
 02 head에 이하 삽입
<script>
var myPlayer;
jQuery(function () {
var isIframe=function(){var a=!1;try{self.location.href!=top.location.href&&(a=!0)}catch(b){a=!0}return a};if(!isIframe()){var logo=$("<a href='http://pupunzi.com/#mb.components/components.html' style='position:absolute;top:0;z-index:1000'><img id='logo' border='0' src='http://pupunzi.com/images/logo.png' alt='mb.ideas.repository'></a>");$("#wrapper").prepend(logo),$("#logo").fadeIn()}
myPlayer = jQuery("#video").YTPlayer();
});
</script>
 03 body에 이하 삽입
<div class="customElement">
    <div class="testText">
        <h1>test</h1>
        <h2>test</h2>
    </div>
</div>
<!--qvuILbcXlg8-->
<div id="video" class="player" data-property="{videoURL:'youtubeの動画ID',containment:'#customElement', showControls:false, autoPlay:true, loop:true, mute:true, startAt:10, opacity:1, addRaster:true, quality:'default'}"></div> <!--BsekcY04xvQ-->
 스타일 설정
#customElement {
    width: 100%;
    height: 400px;
    background: rgba(81, 150, 191, 0.60);
    position: relative;
    top: 0;
    left: 0;
    z-index: 0;
    background: url("images/top/movie01.jpg") no-repeat center center;
    background-size: cover;
}
#testText {
        position: absolute;
        font-size: 40px;
        text-align: center;
        line-height: 80px;
        color: #fff;
        width: 100%;
        margin-top: 0;
}
 
이상, 이런 느낌으로 표시된다.
세로 사이즈는 고정, 옆은 브라우저의 사이즈에 맞추어 가변해, 동영상도 가변한다.
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(수평 가변 세로 고정으로 Youtube를 배경 동영상으로 만드는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/dmmmmmmb/items/5d1b9cf9cf295b0706f6
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
<script>
var myPlayer;
jQuery(function () {
var isIframe=function(){var a=!1;try{self.location.href!=top.location.href&&(a=!0)}catch(b){a=!0}return a};if(!isIframe()){var logo=$("<a href='http://pupunzi.com/#mb.components/components.html' style='position:absolute;top:0;z-index:1000'><img id='logo' border='0' src='http://pupunzi.com/images/logo.png' alt='mb.ideas.repository'></a>");$("#wrapper").prepend(logo),$("#logo").fadeIn()}
myPlayer = jQuery("#video").YTPlayer();
});
</script>
03 body에 이하 삽입
<div class="customElement">
    <div class="testText">
        <h1>test</h1>
        <h2>test</h2>
    </div>
</div>
<!--qvuILbcXlg8-->
<div id="video" class="player" data-property="{videoURL:'youtubeの動画ID',containment:'#customElement', showControls:false, autoPlay:true, loop:true, mute:true, startAt:10, opacity:1, addRaster:true, quality:'default'}"></div> <!--BsekcY04xvQ-->
 스타일 설정
#customElement {
    width: 100%;
    height: 400px;
    background: rgba(81, 150, 191, 0.60);
    position: relative;
    top: 0;
    left: 0;
    z-index: 0;
    background: url("images/top/movie01.jpg") no-repeat center center;
    background-size: cover;
}
#testText {
        position: absolute;
        font-size: 40px;
        text-align: center;
        line-height: 80px;
        color: #fff;
        width: 100%;
        margin-top: 0;
}
 
이상, 이런 느낌으로 표시된다.
세로 사이즈는 고정, 옆은 브라우저의 사이즈에 맞추어 가변해, 동영상도 가변한다.
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(수평 가변 세로 고정으로 Youtube를 배경 동영상으로 만드는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/dmmmmmmb/items/5d1b9cf9cf295b0706f6
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
<div class="customElement">
    <div class="testText">
        <h1>test</h1>
        <h2>test</h2>
    </div>
</div>
<!--qvuILbcXlg8-->
<div id="video" class="player" data-property="{videoURL:'youtubeの動画ID',containment:'#customElement', showControls:false, autoPlay:true, loop:true, mute:true, startAt:10, opacity:1, addRaster:true, quality:'default'}"></div> <!--BsekcY04xvQ-->
#customElement {
    width: 100%;
    height: 400px;
    background: rgba(81, 150, 191, 0.60);
    position: relative;
    top: 0;
    left: 0;
    z-index: 0;
    background: url("images/top/movie01.jpg") no-repeat center center;
    background-size: cover;
}
#testText {
        position: absolute;
        font-size: 40px;
        text-align: center;
        line-height: 80px;
        color: #fff;
        width: 100%;
        margin-top: 0;
}

이상, 이런 느낌으로 표시된다.
세로 사이즈는 고정, 옆은 브라우저의 사이즈에 맞추어 가변해, 동영상도 가변한다.
Reference
이 문제에 관하여(수평 가변 세로 고정으로 Youtube를 배경 동영상으로 만드는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/dmmmmmmb/items/5d1b9cf9cf295b0706f6텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)