Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<div class="speech-container">
  <ul class="speech">
    <li class="speech-bubble speech-bubble-right">
      <img src="https://i.imgur.com/GAkfvkz.png" class="image-left" 
           alt="" role="presentation">
      Lorem ipsum dolor sit amet, consectetur adipiscing elit, 
      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
      Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 
      nisi ut aliquip ex ea commodo consequat. 
      Duis aute irure dolor in reprehenderit in voluptate velit esse cillum 
      dolore eu fugiat nulla pariatur. 
      Excepteur sint occaecat cupidatat non proident, 
      sunt in culpa qui officia deserunt mollit anim id est laborum.
    </li>
    <li class="speech-bubble speech-bubble-left pull-right">
      <img src="https://i.imgur.com/QR0jfdM.png" class="image-right"
           alt="" role="presentation">
      Duis aute irure dolor in reprehenderit in voluptate velit esse cillum 
      dolore eu fugiat nulla pariatur. 
      Excepteur sint occaecat cupidatat non proident, 
      sunt in culpa qui officia deserunt mollit anim id est laborum.
    </li>
    <li class="speech-bubble speech-bubble-right pull-left">
      <img src="https://i.imgur.com/GAkfvkz.png" 
           class="image-left"
           style="top: -30px"
           alt="" role="presentation">
      Lorem ipsum dolor sit amet.
    </li>
    <li class="speech-bubble speech-bubble-left">
      <img src="https://i.imgur.com/QR0jfdM.png" 
           class="image-right" style="top: -10px"
           alt="" role="presentation">
      Excepteur sint occaecat cupidatat non proident, 
      sunt in culpa qui officia deserunt mollit anim id est laborum.
    </li>
    <li class="speech-bubble bubble-no-tail">
      Excepteur sint occaecat cupidatat non proident, 
      sunt in culpa qui officia deserunt mollit anim id est laborum.
    </li>
    <li class="speech-bubble speech-bubble-right pull-right">
      <img src="https://i.imgur.com/GAkfvkz.png" class="image-left"
           alt="" role="presentation">
      Lorem ipsum dolor sit amet, consectetur adipiscing elit, 
      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
      Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 
      nisi ut aliquip ex ea commodo consequat. 
      Duis aute irure dolor in reprehenderit in voluptate velit esse cillum 
      dolore eu fugiat nulla pariatur. 
      Excepteur sint occaecat cupidatat non proident, 
      sunt in culpa qui officia deserunt mollit anim id est laborum.
    </li>
  </ul>
 </div>
              
            
!

CSS

              
                /* Just a container to setup some positioning and fonts */
.speech-container
{
  width: 400px;
  /*margin-left: 400px;*/
  margin-left: auto;
  margin-right: auto;
  
  font-family: Helvetica, Segoe U, Arial, sans-serif;
  font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  font-family: Tahoma, Geneva, sans-serif;
  font-family: Verdana, Geneva, sans-serif;
  font-family: "Trebuchet MS", Helvetica, sans-serif;
  font-family: Calibri, Helvetica, Segoe U, Arial, sans-serif;
  
  font-weight: 300;
  font-size: 1.2em;
}


/* Reset the list styles */
ul.speech
{
  list-style: none;
  padding-left: 0;
}

ul.speech li
{
  margin-bottom: 40px;
  padding: 20px;
  color: white;
}


.speech-bubble {
	position: relative;
	background: #00aabb;
	border-radius: .4em;
}

/* Styling for a speech bubble with the tail on the left side. */
.speech-bubble-right {
}

.speech-bubble-right:after {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 0;
	height: 0;
	border: 20px solid transparent;
	border-right-color: #00aabb;
	border-left: 0;
	border-top: 0;
	margin-top: -10px;
	margin-left: -20px;
}


/* Styling for a speech bubble with the tail on the right side. */
.speech-bubble-left {
}

.speech-bubble-left:after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	width: 0;
	height: 0;
	border: 20px solid transparent;
	border-left-color: #00aabb;
	border-right: 0;
	border-top: 0;
	margin-top: -10px;
	margin-right: -20px;
}


/* A styled bubble without the tail. */
.bubble-no-tail {
	position: relative;
	background: #00aabb;
	border-radius: .4em;
}



/* Pull a list item to the right, "out" of vertical centering. */
.pull-right
{
  position: relative;
  left: 100px;
}


/* Pull a list item to the left, "out" of vertical centering. */
.pull-left
{
  position: relative;
  right: 100px;
}


/* Place the speaker image to the left of the bubble. */
.image-left
{
  width: 120px;
  height: auto;
  
  position: absolute;
  left: -140px;
}


/* Place the speaker image to the right of the bubble. */
.image-right
{
  width: 120px;
  height: auto;
  
  position: absolute;
  right: -140px;
}
              
            
!

JS

              
                // https://pasteboard.co/J3Lu8hH.png

//-- palm-up-right
// https://imgur.com/GAkfvkz
// https://i.imgur.com/GAkfvkz.png

//-- palm-up-left
// https://imgur.com/QR0jfdM
// https://i.imgur.com/QR0jfdM.png
              
            
!
999px

Console