Skip to content

原生 ​

指令碼:https://koin-ad.click/native/v1/main.js

元素:<x-native>

全域物件:native

共用方法見 廣告代碼 API。原生另外提供 type 屬性。type 決定版面。它不跟著容器的尺寸走。

安裝 ​

給元素一個盒子。廣告會填滿這個盒子。

html
<div style="width: 360px; height: 120px">
  <script
    async
    src="https://koin-ad.click/native/v1/main.js?id=UNIT_ID"
  ></script>
  <x-native type="detail"></x-native>
</div>

type ​

若 type 缺少,或不在這份清單裡,版面是 compact。

type版面索取的素材
compact短列,圖示在標題旁邊64×64
detail較大的圖示,加上一段說明120×120
card圖片橫跨頂部430×242
html
<x-native type="card"></x-native>

theme() 名稱 ​

名稱選取對象
native<x-native> 元素
card整張卡片
cover圖片
body文字區塊
headline標題列
brand品牌行
title標題
subtitle說明
action動作
tools工具列
tool單一工具
js
native.theme(`
  card {
    background: #111;
  }
  title {
    color: white;
  }
`);

交通、貨幣化。·Koin廣告網絡用戶指南