OneAlbatross

Speech Bubble Snippet

Jan 25th, 2023 (edited)
5,532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.70 KB | None | 0 0
  1.  
  2. <!-- ---------------------  CODE BY OneAlbatross  ------------------------
  3. ---- ---------------------------------------------------------------------
  4.  
  5. |[All links, socials, etc]:  https://onealbatross.carrd.co/
  6. |[Tip jar]:  https://ko-fi.com/onealbatross
  7.  
  8.  
  9. |[ Rules ]
  10.        - My normal T.O.S. don't really apply here since it's a rather small snippet, all I ask is for you to kindly direct others here if asked where you got the code
  11.  
  12. |[ Info ]
  13.    Color info
  14.    - first version uses bg-light and text-dark
  15.    - second version uses bg-dark and text-light
  16.    - custom version uses background:rgba(255,255,255,1) for the background and color:rgba(0,0,0,1) for the text
  17.    - NOTE there are two instances of each background color - be sure to change both and not just one or the little triangle at the top will be a different color from the box
  18.    
  19.    For use in normal profiles
  20.    - you may want to add <div class="mx-auto" style="max-width:300px"> to the beginning and </div> to the end of the code to get it to stay small and center within the page like in the preview (otherwise it tends to span the entire width or align left)
  21.  
  22.     If the speech bubble is too close or too far from what is above it
  23.     - increase or decrease the negative number in margin-top:-5px (more negative numbers like -20 will place it further up while more positive numbers will move it farther down)
  24.  
  25.  
  26. ---------------------------------------------------------------------------
  27. ----------------------------------------------------------------------- -->
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. <!-- ------------------------------------------------------------------------ -->
  38. <!-- Light Version Bootstrap (bg-light and text-dark) -->
  39. <!-- ------------------------------------------------------------------------ -->
  40. <div style="position:relative; z-index:01; margin-left:15px; margin-top:-5px; margin-bottom:-9px;">
  41.    
  42.     <div class="card bg-light rounded-0 p-2" style="width:15px; border-width:2px 2px 0 0; transform:rotate(315deg);"></div>
  43.  
  44. </div>
  45.  
  46. <div class="card bg-light p-2 mb-2 text-dark">
  47.  
  48.     Your text here - Lorem ipsum dolor sit amet, adipiscing elit.
  49.  
  50. </div>
  51. <!-- ------------------------------------------------------------------------ -->
  52.  
  53.  
  54.  
  55.  
  56.  
  57. <!-- ------------------------------------------------------------------------ -->
  58. <!-- Dark Version Bootstrap (bg-dark and text-light) -->
  59. <!-- ------------------------------------------------------------------------ -->
  60. <div style="position:relative; z-index:01; margin-left:15px; margin-top:-5px; margin-bottom:-9px;">
  61.    
  62.     <div class="card bg-dark rounded-0 p-2" style="width:15px; border-width:2px 2px 0 0; transform:rotate(315deg);"></div>
  63.  
  64. </div>
  65.  
  66. <div class="card bg-dark p-2 mb-2 text-light">
  67.  
  68.     Your text here - Lorem ipsum dolor sit amet, adipiscing elit.
  69.  
  70. </div>
  71. <!-- ------------------------------------------------------------------------ -->
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. <!-- ------------------------------------------------------------------------ -->
  79. <!-- Custom Colors set to white background and black text by default ( background:rgba(255,255,255,1) and color:rgba(0,0,0,1) ) -->
  80. <!-- ------------------------------------------------------------------------ -->
  81. <div style="position:relative; z-index:01; margin-left:15px; margin-top:-5px; margin-bottom:-9px;">
  82.    
  83.     <div class="card rounded-0 p-2" style="width:15px; border-width:2px 2px 0 0; transform:rotate(315deg); background:rgba(255,255,255,1)"></div>
  84.  
  85. </div>
  86.  
  87. <div class="card p-2 mb-2" style="background:rgba(255,255,255,1); color:rgba(0,0,0,1)">
  88.  
  89.     Your text here - Lorem ipsum dolor sit amet, adipiscing elit.
  90.  
  91. </div>
  92. <!-- ------------------------------------------------------------------------ -->
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
Advertisement
Add Comment
Please, Sign In to add comment