加入机器人自由的 合作伙伴和联盟 的程序和支持我们免费开放平台
Bot Libre Forum : How to move the avatar in my website

RE: How to move the avatar in my website

通过 admin 发布 Oct 24 2018, 11:56

The createBox() function in the embed JavaScript code is what add a <div id="avatar-avatarbox"> to the page for the avatar. The div is positioned as fixed on the bottom left by default.

You can change the position of the "avatar-avatarbox" element in css, such as a style tag, for example:

<style>#avatar-avatarbox { top: 10px; bottom: initial; right: 10px; left: initial }</style>

If you want to position the avatar inside a div in your page, then you either need to reparent it in JavaScript, or create the <div id="avatar-avatarbox"> with all the correct children (canvas/video divs) and not call the createBox() function.

To reparent the JavaScript code would be something like this (after the createBox() call):

<script>
var avatarDiv = document.getElementById("avatar-avatarbox");
var newParent = document.getElementById("my-avatar-div");
newParent.addChild(avatarDiv);
</script>


by magatlaw posted Oct 24 2018, 20:54

Thank you so much for replying.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1399, today: 3, week: 4, month: 24

Id: 24736981
发布: Oct 24 2018, 11:56
答复: 1
的风景: 1472, 今天: 2, 周: 2, 一个月: 23
我敢肯定
标志后的进攻,或者在违反规则网站