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 style="width:600px">
<h1>Lorem Ipsum</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nunc mi ipsum faucibus vitae aliquet nec.
</p>
<div id="adPlayerDiv"></div>
<p>
Habitasse platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper. Varius vel pharetra vel turpis nunc eget lorem dolor.
</p>
</div>

<!-- The following line is the Brightcove Player script. Replace it with your player. You can  -->
<!-- include the default player for your account by just changing the account number to use your own. -->
<!-- That way you don't even need to create a new Brightcove Player. -->
<script src="https://players.brightcove.net/1752604059001/default_default/index.min.js"></script>
<!-- These next two lines are the IMA3 plugin - the ad integration using Google's IMA3 HTML5 SDK. -->
<!-- You can get a little bit faster load time if you include these in the player config and build -->
<!-- them together as one unit using the Brightcove Player Management API. -->
<!-- If you do that then they will be part of the player index.min.js. -->
<link href="https://players.brightcove.net/videojs-ima3/3/videojs.ima3.min.css" rel="stylesheet"/>
<script src="https://players.brightcove.net/videojs-ima3/3/videojs.ima3.min.js"></script>
<!-- This is the ad-only player loader script. You can use it unmodified since it's hosted from -->
<!-- Brightcove's player origin and served over CDN. You can also use it as an example of how to -->
<!-- dynamically load the Brightcove Player and do your own thing. It can also be included in your -->
<!-- player config if you choose. -->
<script src="https://players.brightcove.net/3723496277001/files/adonly.js"></script>
              
            
!

CSS

              
                /* * The body style is just for the
 * background color of the codepen.
 * Do not include in your code.
 */
body {
  background-color: #111;
  color: #fff;
}
/*
 * Styles essential to the sample
 * are below
 */
              
            
!

JS

              
                // The following script injects an outstream (aka 'ad-only') player into the div defined above in the text called
// 'adPlayerDiv'. You can specify an ad tag here or use in-line VAST, as demonstrated below. Comment out the in-line
// VAST (the 'adsResponse' parameter) and un-comment the ad tag to try an ad tag instead.
// For more information on how this works read the comments in the source code included here:
// http://players.brightcove.net/3723496277001/files/adonly.js

// If you don't want it to expand the div you can use the injectAdOnlyPlayer function instead.
bcPlayerTools.expandAndInjectAdOnlyPlayer({
	div: adPlayerDiv,
// Un-comment this line if you want to try an adTag
//	adTag: "https://ads.brightcove.com/ads?vc=1&dur=5",
// Or you can use in-line VAST like this. Comment this part out if you want to use an ad tag
	adsResponse:
		'<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd"\ version="3.0">\
		 <Ad id="bc-test-10s-blue">\
		  <InLine>\
		   <AdSystem>BCTest</AdSystem>\
		   <AdTitle>10-Second Soccer Ball Countdown</AdTitle>\
		   <Description><![CDATA[10-Second Soccer Ball Countdown Ad]]></Description>\
		   <Creatives>\
		    <Creative AdID="bc-test-10s-blue">\
		     <Linear>\
		      <Duration>00:00:10</Duration>\
		      <VideoClicks>\
		        <ClickThrough><![CDATA[http://www.brightcove.com/]]></ClickThrough>\
		      </VideoClicks>\
		      <MediaFiles>\
		       <MediaFile id="bc_test" delivery="progressive" width="1280" height="720" type="video/mp4" bitrate="2096" scalable="true" maintainAspectRatio="true"><![CDATA[https://solutions.brightcove.com/abroadstone/10s_blue_ad_high.mp4]]></MediaFile>\
		       <MediaFile id="bc_test" delivery="progressive" width="480" height="270" type="video/mp4" bitrate="594" scalable="true" maintainAspectRatio="true"><![CDATA[https://solutions.brightcove.com/abroadstone/10s_blue_ad_mid.mp4]]></MediaFile>\
		      </MediaFiles>\
		     </Linear>\
		    </Creative>\
		   </Creatives>\
		  </InLine>\
		 </Ad>\
		</VAST>',
	height: 360,
	animationDuration: 200,
// autoplays muted by default - which is the only way it will work in some browsers
// un-comment these lines if you want to change the settings
//  autoplay: false,
//	muted: false
});
              
            
!
999px

Console