內嵌 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>







Related Posts

Git 與 Github 版本控制基本指令與操作入門教學

Git 與 Github 版本控制基本指令與操作入門教學

[C#] 如何透過 EmailMessage 寄代理傳送者郵件 How to send an email on half of another user via EmailMessage

[C#] 如何透過 EmailMessage 寄代理傳送者郵件 How to send an email on half of another user via EmailMessage

MTR04_0805

MTR04_0805




Sponsored



Comments