几种常见的嵌入方式,复制即用。
引入脚本后,在页面任意位置放置组件标签即可。
<script src="https://ipwcc.fun/ip.js"></script>
<ip-geo-widget></ip-geo-widget>通过 style 自定义容器外观(圆角、背景、内边距等)。
<ip-geo-widget style="padding:20px;background:#fff;border-radius:15px"></ip-geo-widget>| 属性 | 默认值 | 说明 |
|---|---|---|
api-url | https://ipwcc.fun/ipcc.php | 自定义数据接口地址 |
theme | light | 主题:light / dark |
show-refresh | true | 是否显示刷新按钮,设为 false 隐藏 |
<ip-geo-widget theme="dark" show-refresh="false"></ip-geo-widget>