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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <div style="text-align: center;">SpanText makes web text transform in real time to user interaction. <span class="technical2">Written in JavaScript, i</span><span class="plain1">I</span>t can be installed and used on any website.
<span class="shorter1">Move the sliders below to try it out and learn more.</span><span class="longer2" style="color: #0000ff;"><a href="http://codepen.io/nbeversluis/pen/XdexBO?editors=1000"><strong>Try writing SpanText using CodePen.io</strong></a></span></div>
</div>
<table>
<tbody>
<tr>
<td>
<div><strong>Shorter</strong></div></td>
<td><div class="spantextslider" id="SpanText1" type="input" data-spantextmin="1" data-spantextmax="5.5" data-spantextattrR="longer" data-spantextattrL="shorter" data-spantextspeed="20" data-spantextinit="1"></div></td>
<td>
<div><strong>Longer</strong></div></td>
</tr>
<tr>
<td class="slider-container-label-space">
<div class="slider-label-left"><strong>Plain Language</strong></div></td>
<td><div class="spantextslider" id="SpanText2" type="input" data-spantextmin="1" data-spantextmax="5.5" data-spantextattrR="technical" data-spantextattrL="plain" data-spantextspeed="20" data-spantextinit="1"></div></td>
<td class="slider-container-label-space">
<div class="slider-label-right"><strong>Technical Language</strong></div></td>
</tr>
</tbody>
</table>
<span class="longer2">SpanText makes web text variable and interactive, embedding multiple versions or variations of a text into a single, flexible document. <span class="longer3">Any kind of web text with potential variation in length, tone, content, vocabulary, reading level, audience, or any other attribute, may be transformed into an engrossing web reading experience using SpanText.</span><span class="longer2"> As you move the top slider on this page right, this explanation becomes longer. The bottom slider adjusts how technical the explanation is.</span>

<span class="longer2">SpanText works by separating text into segments that can be controlled from sliders in real time. </span><span class="technical3">Each text segment is enclosed within an HTML &lt;span&gt; tag and a class name so it can be identified and manipulated. The sliders then activate Javascript to access and hide or show the text elements in real time. </span><span class="longer3"> A segment can be as short as a single character or as long as an entire paragraph or section. </span><span class="longer4"> For example, if you move the top slider all the way to the right, this sentence will end in an exclamation marks; otherwise it will end in a period<span class="shorter4">.</span><span class="longer5">!</span></span></span>

<span class="longer4">Text can be revealed as the slider moves either right or left, then hidden as the slider moves in the opposite direction. So SpanText can adjust length, content, or both.<span class="longer5">SpanText also supports nested attributes, so text may be hidden or shown conditionally based on more than one slider's settings.</span><span class="technical3"><span class="longer5"> For example, this sentence will only display when the "length" slider is set to maximum and the "Technical" slider is three or higher.</span></span></span><span class="longer4"> As you can see, SpanText also animates the text content, so it appears to expand or contract itself. This speed is adjustable.</span> <span class="technical4">The sliders on this page have five gradations (settings), but it is possible to use less or more, with no theoretical upper limit.</span>

<span class="longer3"><span class="technical3">Writing text that will animate with SpanText requires skill in HTML. There are several examples on this website.</span><span>

<span class="longer2">Thank you for reading about SpanText! </span>

            
          
!

CSS

            
              .slider-container {	
	border-style:none !important;
}

.slider-container-label-space {
	width:25%;
	padding-bottom: 10px;
	padding-top: 10px;
}

            
          
!

JS

            
              
            
          
!
999px

Console