HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div class='scene'>
<div class='assembly'>
<div class='plane'></div>
<div class='plane'></div>
</div>
</div>
<p>Muffin cake dessert cake pie chocolate wafer. Wafer brownie danish halvah brownie danish powder. Dessert marzipan sweet roll chupa chups gingerbread brownie pastry liquorice. Liquorice caramels powder. Fruitcake oat cake biscuit dragée cotton candy. Cake muffin cupcake icing sweet roll donut sugar plum apple pie. Donut lollipop pudding. Wafer sesame snaps cake donut pudding. Jelly candy canes sugar plum sugar plum chocolate bar candy canes cupcake cookie lollipop. Chocolate macaroon apple pie. Cotton candy tart tootsie roll jelly beans croissant brownie. Toffee cake pie cake sugar plum pie. Gingerbread cake cake gummi bears gingerbread cotton candy ice cream chocolate cake cotton candy.</p>
<p>Biscuit chocolate cookie muffin sweet roll pudding. Croissant macaroon bonbon cake cupcake dessert. Candy marzipan soufflé gingerbread cotton candy lemon drops tart. Caramels sweet cupcake bonbon cake chupa chups chocolate cake chocolate cake chocolate bar. Jujubes tootsie roll brownie oat cake jelly lollipop muffin sweet. Chocolate bar chocolate cake jelly. Bonbon cupcake gummies dragée halvah powder chocolate cake. Sweet brownie cookie. Cake halvah lemon drops bonbon marshmallow. Candy fruitcake gingerbread ice cream marshmallow dragée topping ice cream. Brownie liquorice tiramisu marshmallow chocolate bar croissant gummies. Donut pastry cake apple pie cake. Sweet roll pudding sweet roll sugar plum marshmallow marzipan chocolate.</p>
<p>Toffee donut gummi bears chocolate cake toffee. Donut pudding topping. Brownie macaroon tart chocolate bar dessert tootsie roll cake gummi bears toffee. Wafer cake croissant lollipop pie toffee. Chocolate bar soufflé gummi bears cake halvah marshmallow icing. Tart halvah sugar plum croissant gingerbread sweet roll tootsie roll macaroon. Marzipan cake cake wafer brownie chupa chups muffin. Sweet chocolate sugar plum biscuit chupa chups gummies gummies halvah soufflé. Dessert gingerbread croissant chocolate cake icing tiramisu candy. Tiramisu jujubes ice cream biscuit jelly-o dragée. Muffin gingerbread brownie tootsie roll chocolate cake tart sesame snaps croissant ice cream. Chocolate cake halvah jelly beans chocolate cake apple pie lollipop bear claw ice cream. Ice cream liquorice topping lemon drops tart soufflé. Bonbon lemon drops pastry lemon drops jelly beans.</p>
<p>Bonbon dragée lollipop halvah macaroon croissant. Chocolate cake cake sweet dessert. Jelly-o jujubes sweet cake fruitcake dessert. Tiramisu chocolate cake jelly-o brownie cake gummi bears candy canes dragée. Candy donut dragée jelly-o. Macaroon caramels chocolate cake muffin. Halvah chocolate halvah sweet. Topping pie tootsie roll jelly-o candy canes chocolate cake cake oat cake sugar plum. Oat cake lemon drops toffee sugar plum sweet marshmallow. Tootsie roll halvah fruitcake chocolate bar gummi bears. Brownie biscuit cotton candy biscuit cake pudding liquorice gummi bears candy. Brownie cake cake sugar plum danish. Wafer dragée bonbon. Tootsie roll marzipan cupcake halvah pastry cupcake bonbon bonbon pudding.</p>
<p>Candy tiramisu marzipan cotton candy cake cake. Jelly cake cotton candy marzipan fruitcake sweet roll. Cookie topping cake gummies gummies soufflé gummies. Powder cotton candy wafer. Candy canes tiramisu candy cake pudding liquorice. Chocolate cake danish dessert sweet chupa chups candy gingerbread. Pudding cotton candy cotton candy. Tootsie roll marzipan muffin chocolate bar dessert dragée lemon drops marshmallow. Muffin tiramisu chupa chups cake marzipan bear claw chupa chups. Apple pie oat cake gingerbread marzipan. Pastry ice cream lemon drops cake tiramisu jujubes wafer lemon drops. Halvah cake sesame snaps soufflé cookie gummies. Sweet roll gingerbread caramels powder sugar plum gingerbread chocolate bar tiramisu cake. Macaroon apple pie cotton candy gingerbread muffin fruitcake marshmallow pie.</p>
$dim: 10em;;
.scene {
float: left;
overflow: hidden;
width: 30vw; height: 30vh;
perspective: 40em;
}
.assembly {
position: absolute;
top: 50%; left: 50%;
transform-style: preserve-3d;
}
.plane {
position: absolute;
margin: -.5*$dim;
width: $dim; height: $dim;
background: #ee8c25;
&:last-child {
transform: translateY(50%)
rotateY(60deg) rotate(45deg);
background: #d14730;
}
}
Also see: Tab Triggers