<div class="chat-support"> <div class="chat-wrap"> <div class="chat-frame"> <iframe src=https://copilotstudio.microsoft.com/environments/.../webchat?__version__=2 frameborder="0" style="width: 100%; height: 100%;"></iframe> </div> <div class="chat-bubble"> <span>Ask our virtual assistant</span> <button><img src="Picture.svg"/></button> </div> </div> </div> <style> .chat-support { position: fixed; bottom: 100px; right: 100px; z-index: 999; } .chat-support .chat-wrap { position: relative; } .chat-support .chat-frame { display: none; position: absolute; bottom: 80px; right: 0; border: 1px solid #444; max-width: 555px; width: calc(100vw - 80px); height: 630px; } .chat-support .chat-bubble { display: flex; align-items: center; } .chat-support .chat-bubble span { padding: 10px 40px 10px 10px; background: #F0F0F0; margin-right: -30px; } .chat-support .chat-bubble button { cursor: pointer; background: transparent; border: none; width: 60px; height: 60px; padding: 0; transition: transform 200ms ease; transform-origin: center; } .chat-support .chat-bubble button:hover { transform: scale(1.1); } .chat-support .chat-bubble button img { width: 100%; height: 100%; background-size: contain; } .chat-support.open .chat-frame { display: block; } @media only screen and (max-width: 767px) { .chat-support { right: 40px; bottom: 40px; } .chat-support .chat-frame { height: 68vh; bottom: 70px; } .chat-support .chat-bubble span { display: none; } .chat-support .chat-bubble button { width: 50px; height: 50px; } } </style> <script> const chatSupport = document.querySelector('.chat-support'); const chatSupportBtn = chatSupport.querySelector('button'); chatSupportBtn.addEventListener('click', evt => { evt.preventDefault(); chatSupport.classList.toggle('open') }); </script>
Ekta Gupta
4
ricardodesouza
2
L-1234567-0
2