现在怎么样了?
I do not fully understand how these files are connected to my project:假设你使用的是iframe实现,这意味着你使用的是你找到的源代码的编译版本。
如果您查看 iframe 内容(对 URL 执行 GET),它看起来如下所示:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>MyBotId</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
<link href="/css/adaptive/botchat.css" rel="stylesheet" />
<link href="/css/adaptive/botchat-fullwindow.css" rel="stylesheet" />
</head>
<body>
<div id="BotChatElement"></div>
<script src="/scripts/adaptive/botchat.js"></script>
<script>
var model = {
"userId": "demo1234",
"userName": "You",
"botId": "MyBotId",
"botIconUrl": "//bot-framework.azureedge.net/bot-icons-v1/bot-framework-default-8.png",
"botName": "MyBotId",
"secret": "mySecret",
"iconUrl": "//bot-framework.azureedge.net/bot-icons-v1/bot-framework-default-8.png",
"directLineUrl": "https://webchat.botframework.com/v3/directline",
"webSocketEnabled": "false"
};
</script>
<script>
BotChat.App({
directLine: {
secret: model.secret,
token: model.token,
domain: model.directLineUrl,
webSocket: false
},
user: { id: model.userId, name: model.userName },
bot: { id: model.botId, name: model.botName },
resize: 'window'
}, document.getElementById("BotChatElement"));
</script>
</body>
</html>
如您所见,它引用了一个 css 文件,由 GitHub 项目编译。
如何添加自定义 CSS?
在您这边,您可以编辑这个 css,编辑它,并使用与上面相同的实现,但将 css 链接替换为您的。