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 广告联盟用户使用指南