內嵌 youtube 的廣告


iframe

  • 在 youtube > 分享 > 嵌入 可以找到嵌入程式碼

因為是寫死固定寬高 16:9,沒什麼需要筆記的。

<div class="ad-container" style="  
  background-color: lightblue;
  width: 300;
  height: 250;
  display: flex;
  flex-direction: column;
  text-align: center;">

    <!-- youtube iframe 300x165-->
    <div class="iframe-16x9">
        <iframe width="300" height="165" src="https://www.youtube.com/embed/jj6V0Y2s9Fs" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    </div>
    <!-- /youtube -->

    <!-- link photo 300x85 -->
    <div class=link style="
        overflow:inherit;
        height: 85;">

        <a href="https://www.bnext.com.tw/" target="_blank" draggable="false" style="
        text-decoration: none;
        color: hotpink;">
            <img src="https://ads-cdn.tenmax.io/creative/2019/12/11/15001-image.jpg?cb=1576056388625" alt="" width="300" height="85">
        </a>
    </div>
    <!-- /link -->
</div>







你可能感興趣的文章

[JS101] JavaScript - 介紹、基本運算

[JS101] JavaScript - 介紹、基本運算

[FE102] Part 2

[FE102] Part 2

MTR04_0708

MTR04_0708






留言討論