Guest User

Untitled

a guest
Jan 16th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <button id="toggleMessage">
  2. Toggle Message
  3. </button>
  4. <div class="float-container">
  5. <div id="floating-message">Hello There 👋, chat with us!</div>
  6. <div id="floating-bubble"></div>
  7. </div>
  8.  
  9. .float-container {
  10. display: flex;
  11. position: fixed;
  12. bottom: 0;
  13. right: 0;
  14. }
  15. #floating-bubble {
  16. background-color: teal;
  17. margin-bottom: 20px;
  18. margin-right: 60px;
  19. border-radius: 50%;
  20. width: 50px;
  21. height: 50px;
  22. box-shadow: 0 0 20px rgba(0,0,0,.5);
  23. transition: box-shadow .5s ease-in-out;
  24. cursor: pointer;
  25. z-index: 2147483645;
  26. border-bottom-right-radius: 0;
  27. background-image: url('https://cdn0.iconfinder.com/data/icons/thin-communication-messaging/57/thin-036_bubble_comment_chat_message-512.png');
  28. background-position: center;
  29. background-size: 80%;
  30. background-repeat: no-repeat;
  31. border-bottom-right-radius: 0;
  32. }
  33. #floating-message {
  34. margin-right: 15px;
  35. background: #3a96dd;
  36. padding: 5px;
  37. transition: none;
  38. animation-duration: .5s;
  39. animation-name: slidein,wiggle;
  40. animation-iteration-count: 1,4;
  41. animation-direction: normal,alternate;
  42. animation-timing-function: ease-in,ease-in-out;
  43. border-radius: 10px;
  44. font-size: 14px;
  45. box-shadow: 0 0 10px #000;
  46. color: #fff;
  47. font-family: Calibri, sans-serif;
  48. }
Add Comment
Please, Sign In to add comment