如何更改聊天窗口的大小和其他属性 [英] How to change the size and other properties of the chat window
问题描述
我使用botframework创建了一个简单的bot应用程序.我将聊天窗口嵌入到iframe中.如何控制聊天窗口的大小和其他属性,例如颜色,字体等.
I have created a simple bot application using the botframework. I am embedding the chat window in an iframe. How can I control the chat window size and other properties like color, font etc.
推荐答案
您可以调整iframe的大小,但是修改其中的内容的选择有限-
You can size the iframe but your options of modifying what's in it are limited - CSS override body style for content in iframe?.
以下是我通常如何将提供的Bot Framework的iframe
与大小控制集成在一起的方法:
Here's how I typically integrate the provided Bot Framework's iframe
with size control:
<div id="bot">
<iframe src="https://webchat.botframework.com/embed/..."
style="height: 600px; width: 500px; resize: both;">
</iframe>
</div>
如果您想更好地控制网络聊天的呈现方式,则可能需要查看其他更高级的集成其网络聊天的选项.在其github页面上阅读更多信息: https://github.com/Microsoft/BotFramework-WebChat
If you want to have more control over how the web chat renders, you might want to look at other more advanced options of integrating their web chat. Read more on their github page: https://github.com/Microsoft/BotFramework-WebChat
这篇关于如何更改聊天窗口的大小和其他属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!