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.
.container
.card
.name GIGI YEH
hr
.title Graphic Designer
.email gigiyeh@company.com
.phone 0938-388-388
.card-back
.card-front
.card2
.card-pink
.circle1
.circle2
.circle3
.circle4
.circle5
.circle6
.circle7
.circle8
body
margin: 0px
padding: 0px
overflow: hidden
background: -moz-linear-gradient(-45deg, #ffe0e3 32%, #a7e0e5 68%) /* FF3.6-15 */
background: -webkit-linear-gradient(-45deg, #ffe0e3 32%,#a7e0e5 68%) /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(135deg, #ffe0e3 32%,#a7e0e5 68%) /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
html
margin: 0px
padding: 0px
*
letter-spacing: 1px
font-family: Arial
color: white
@mixin card($margin,$bg,$w,$h)
width: $w
height: $h
padding: 30px
border-radius: 10px
margin: $margin
background-color: $bg
@mixin circle($w,$h,$bg,$border,$opacity)
width: $w
height: $h
background-color: $bg
border: $border
opacity: $opacity
position: absolute
border-radius: 100%
.container
margin: 90px auto 300px auto
position: relative
@keyframes card-ani1
0%
opacity: 0
transform: translateX(30px)translateY(30px)
100%
opacity: 1
transform: translateX(0px)translateY(0px)
@keyframes card-ani2
0%
opacity: 0
transform: translateX(0px)translateY(50px)
100%
opacity: 1
transform: translateX(0px)translateY(0px)
color: #9B9B9B
.card
+card(80px auto 50px auto,white,165px,280px)
animation: card-ani1 1s
transition-delay: 1s
transition-timing-function: easeOutCirc
position: relative
.name
font-size: 28px
margin: 15px auto 0px auto
animation: card-ani2 1s
animation-delay: 0s
animation-fill-mode: forwards
hr
border: 0
height: 1px
background-color: #d4d4d4
animation: card-ani2 1s
animation-delay: 0.1s
animation-fill-mode: forwards
.title
font-size: 14px
animation: card-ani2 1s
animation-delay: 0.3s
animation-fill-mode: forwards
.email
font-size: 14px
margin: 160px auto 6px auto
animation: card-ani2 1s
animation-delay: 0.4s
animation-fill-mode: forwards
.phone
font-size: 14px
animation: card-ani2 1s
animation-delay: 0.6s
animation-fill-mode: forwards
@keyframes card-ani3
0%
opacity: 0
transform: translateX(-60px)translateY(-60px)
100%
opacity: 0.5
transform: translateX(0px)translateY(0px)
.card-back
+card(-286px 0px 0px -8px,white,160px,275px)
z-index: -1
position: relative
opacity: 0.5
animation: card-ani3 1s
transition-delay: 10s
transition-timing-function: easeOutCirc
@keyframes card-ani4
0%
opacity: 0
transform: translateX(50px)translateY(50px)
100%
opacity: 1
transform: translateX(0px)translateY(0px)
.card-front
+card(-373px 0px 0px -49px,transparent,165px,275px)
border: solid 2px white
z-index: -1
position: relative
animation: card-ani4 1s
transition-delay: 6s
animation-timing-function: easeOutCirc
.card2
+card(-323px auto 0px -30px,transparent,165px,280px)
overflow: hidden
position: relative
animation: card-ani4 1s
transition-delay: 6s
animation-timing-function: easeOutCirc
.card-pink
+card(-46px 0px 0px -49px,transparent,165px,275px)
border: solid 2px #FFE0E3
position: relative
@keyframes circle-ani1
0%
transform: translateX(0px)translateY(0px)
20%
transform: translateX(20px)translateY(-10px)
40%
transform: translateX(-10px)translateY(-30px)
60%
transform: translateX(-20px)translateY(-10px)
80%
transform: translateX(10px)translateY(10px)
100%
transform: translateX(0px)translateY(0px)
@keyframes circle-ani2
0%
transform: translateX(20px)translateY(0px)
20%
transform: translateX(-10px)translateY(20px)
40%
transform: translateX(0px)translateY(-10px)
60%
transform: translateX(20px)translateY(0px)
80%
transform: translateX(-10px)translateY(20px)
100%
transform: translateX(20px)translateY(0px)
@keyframes circle-ani3
0%
transform: translateX(-30px)translateY(10px)
20%
transform: translateX(-10px)translateY(0px)
40%
transform: translateX(0px)translateY(-20px)
60%
transform: translateX(20px)translateY(10px)
80%
transform: translateX(15px)translateY(-20px)
100%
transform: translateX(-30px)translateY(10px)
.circle1
+circle(500px,500px,white,0,0.3)
bottom: -254px
left: -255px
animation: circle-ani1 10s infinite
animation-timing-function: linear
.circle2
+circle(120px,120px,white,0,0.5)
bottom: 214px
left: -69px
animation: circle-ani2 10s infinite
animation-timing-function: linear
.circle3
+circle(30px,30px,white,0,0.6)
top: 183px
left: 78px
animation: circle-ani3 10s infinite
animation-timing-function: linear
.circle4
+circle(220px,220px,transparent,solid 2px white,0.6)
bottom: -100px
left: 100px
animation: circle-ani3 10s infinite
animation-timing-function: linear
.circle5
+circle(50px,50px,white,0,0.5)
bottom: 30px
left: 298px
animation: circle-ani2 10s infinite
animation-timing-function: linear
.circle6
+circle(300px,300px,transparent,solid 2px white,0.6)
top: -150px
right: -80px
animation: circle-ani3 10s infinite
animation-timing-function: linear
.circle7
+circle(165px,165px,white,0,0.45)
top: 71px
right: -106px
animation: circle-ani1 10s infinite
animation-timing-function: linear
.circle8
+circle(20px,20px,white,0,0.7)
top: 183px
right: 78px
animation: circle-ani2 10s infinite
animation-timing-function: linear
Also see: Tab Triggers