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 URL's 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 it's URL and the proper URL extention.
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 Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
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="bezier">
bezier
</div>
.bezier{
width: 400px;
text-align: center;
animation: 2s linear 0s infinite normal none running animation;
}
@keyframes animation {
1% {
background: linear-gradient(to right, #ffcc99 0.9063428571428567%, #efefef 10.906342857142857%)
}
2% {
background: linear-gradient(to right, #ffcc99 6.627885714285714%, #efefef 16.627885714285714%)
}
3% {
background: linear-gradient(to right, #ffcc99 12.168399999999998%, #efefef 22.1684%)
}
4% {
background: linear-gradient(to right, #ffcc99 17.531657142857142%, #efefef 27.531657142857142%)
}
5% {
background: linear-gradient(to right, #ffcc99 22.721428571428568%, #efefef 32.72142857142857%)
}
6% {
background: linear-gradient(to right, #ffcc99 27.74148571428571%, #efefef 37.74148571428571%)
}
7% {
background: linear-gradient(to right, #ffcc99 32.5956%, #efefef 42.5956%)
}
8% {
background: linear-gradient(to right, #ffcc99 37.28754285714286%, #efefef 47.28754285714286%)
}
9% {
background: linear-gradient(to right, #ffcc99 41.821085714285715%, #efefef 51.821085714285715%)
}
10% {
background: linear-gradient(to right, #ffcc99 46.2%, #efefef 56.2%)
}
11% {
background: linear-gradient(to right, #ffcc99 50.42805714285715%, #efefef 60.42805714285715%)
}
12% {
background: linear-gradient(to right, #ffcc99 54.50902857142857%, #efefef 64.50902857142857%)
}
13% {
background: linear-gradient(to right, #ffcc99 58.44668571428572%, #efefef 68.44668571428572%)
}
14% {
background: linear-gradient(to right, #ffcc99 62.2448%, #efefef 72.2448%)
}
15% {
background: linear-gradient(to right, #ffcc99 65.90714285714286%, #efefef 75.90714285714286%)
}
16% {
background: linear-gradient(to right, #ffcc99 69.4374857142857%, #efefef 79.4374857142857%)
}
17% {
background: linear-gradient(to right, #ffcc99 72.8396%, #efefef 82.8396%)
}
18% {
background: linear-gradient(to right, #ffcc99 76.11725714285714%, #efefef 86.11725714285714%)
}
19% {
background: linear-gradient(to right, #ffcc99 79.27422857142857%, #efefef 89.27422857142857%)
}
20% {
background: linear-gradient(to right, #ffcc99 82.31428571428572%, #efefef 92.31428571428572%)
}
21% {
background: linear-gradient(to right, #ffcc99 85.24119999999999%, #efefef 95.24119999999999%)
}
22% {
background: linear-gradient(to right, #ffcc99 88.05874285714285%, #efefef 98.05874285714285%)
}
23% {
background: linear-gradient(to right, #ffcc99 90.77068571428572%, #efefef 100%)
}
24% {
background: linear-gradient(to right, #ffcc99 93.38079999999997%, #efefef 100%)
}
25% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
26% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
27% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
28% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
29% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
30% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
31% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
32% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
33% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
34% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
35% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
36% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
37% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
38% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
39% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
40% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
41% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
42% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
43% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
44% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
45% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
46% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
47% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
48% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
49% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
50% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
51% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
52% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
53% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
54% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
55% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
56% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
57% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
58% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
59% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
60% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
61% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
62% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
63% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
64% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
65% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
66% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
67% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
68% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
69% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
70% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
71% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
72% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
73% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
74% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
75% {
background: linear-gradient(to right, #ffcc99 100%, #efefef 100%)
}
76% {
background: linear-gradient(to right, #efefef 0%, #ffcc99 6.61920000000001%)
}
77% {
background: linear-gradient(to right, #efefef 0%, #ffcc99 9.229314285714288%)
}
78% {
background: linear-gradient(to right, #efefef 1.9412571428571415%, #ffcc99 11.941257142857141%)
}
79% {
background: linear-gradient(to right, #efefef 4.758799999999976%, #ffcc99 14.758799999999976%)
}
80% {
background: linear-gradient(to right, #efefef 7.68571428571428%, #ffcc99 17.68571428571428%)
}
81% {
background: linear-gradient(to right, #efefef 10.72577142857142%, #ffcc99 20.72577142857142%)
}
82% {
background: linear-gradient(to right, #efefef 13.882742857142848%, #ffcc99 23.882742857142848%)
}
83% {
background: linear-gradient(to right, #efefef 17.160400000000006%, #ffcc99 27.160400000000006%)
}
84% {
background: linear-gradient(to right, #efefef 20.562514285714265%, #ffcc99 30.562514285714265%)
}
85% {
background: linear-gradient(to right, #efefef 24.092857142857156%, #ffcc99 34.092857142857156%)
}
86% {
background: linear-gradient(to right, #efefef 27.755200000000002%, #ffcc99 37.7552%)
}
87% {
background: linear-gradient(to right, #efefef 31.553314285714293%, #ffcc99 41.55331428571429%)
}
88% {
background: linear-gradient(to right, #efefef 35.49097142857144%, #ffcc99 45.49097142857144%)
}
89% {
background: linear-gradient(to right, #efefef 39.571942857142844%, #ffcc99 49.571942857142844%)
}
90% {
background: linear-gradient(to right, #efefef 43.80000000000004%, #ffcc99 53.80000000000004%)
}
91% {
background: linear-gradient(to right, #efefef 48.178914285714306%, #ffcc99 58.178914285714306%)
}
92% {
background: linear-gradient(to right, #efefef 52.71245714285718%, #ffcc99 62.71245714285718%)
}
93% {
background: linear-gradient(to right, #efefef 57.40440000000007%, #ffcc99 67.40440000000007%)
}
94% {
background: linear-gradient(to right, #efefef 62.258514285714256%, #ffcc99 72.25851428571426%)
}
95% {
background: linear-gradient(to right, #efefef 67.27857142857142%, #ffcc99 77.27857142857142%)
}
96% {
background: linear-gradient(to right, #efefef 72.46834285714284%, #ffcc99 82.46834285714284%)
}
97% {
background: linear-gradient(to right, #efefef 77.83160000000001%, #ffcc99 87.83160000000001%)
}
98% {
background: linear-gradient(to right, #efefef 83.37211428571425%, #ffcc99 93.37211428571425%)
}
99% {
background: linear-gradient(to right, #efefef 89.09365714285717%, #ffcc99 99.09365714285717%)
}
100% {
background: linear-gradient(to right, #efefef 95.0%, #ffcc99 100%)
}
}
Also see: Tab Triggers