관리 메뉴

moozi

youtube 동영상을 배경화면으로 본문

TIS_2016/HTML5_2기

youtube 동영상을 배경화면으로

moozi 2016. 5. 27. 13:36

youtube 동영상을 배경화면으로




<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>유튜브 동영상 배경</title>

    <style type="text/css">

    * { box-sizing: border-box; }

    .video-background {

        background: #000;

        position: fixed;

        top: 0; right: 0; bottom: 0; left: 0;

        z-index: -99;

    }

    .video-foreground,

    .video-background iframe {

        position: absolute;

        top: 0;

        left: 0;

        width: 100%;

        height: 100%;

        pointer-events: none;

    }

    @media (min-aspect-ratio: 16/9) {

    .video-foreground { height: 300%; top: -100%; }

    }

    @media (max-aspect-ratio: 16/9) {

    .video-foreground { width: 300%; left: -100%; }

    }

    h1{ color:white;}

    </style>

    

</head>

<body>

<div class="video-background">

    <div class="video-foreground">

      <iframe src="https://www.youtube.com/embed/sbc2yBheAbo?controls=0&showinfo=0&rel=0&autoplay=1&loop=1&playlist=sbc2yBheAbo" frameborder="0" allowfullscreen></iframe>

    </div>

  </div>

<h1>악동뮤지션</h1>







</body>

</html>

'TIS_2016 > HTML5_2기' 카테고리의 다른 글

5/30 부트스트랩 레이아웃  (0) 2016.05.30
반응형 레이아웃 샘플  (0) 2016.05.28
html/css 연습문제  (0) 2016.05.27
5/27 transition 적용하기  (0) 2016.05.27
animation.css 사용하기  (0) 2016.05.26
Comments