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.
<ul class="yumburger">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li>♛</li>
<li>♛</li>
<li>♛</li>
<li></li>
<li></li>
<li></li>
<li>✿</li>
<li></li>
<li></li>
<li></li>
<li>✿</li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li>✿</li>
<li></li>
<li></li>
<li></li>
<li>✿</li>
<li></li>
</ul>
body,html {padding: 0;margin: 0;min-width: 100%;min-height: 100%;}
body {position: absolute; top: 0;left: 0;}
@@keyframes rotate {
0% { transform: rotateY(-40deg) rotateX(20deg); }
100% { transform: rotateY(320deg) rotateX(20deg); }
}
:root{--bread1:#bc6310;--bread2:#c06314;--bread3:#d48013; --bread4:#eb9d1c; --bread5:#fcb943}
body {
perspective: 800px;
background: #EEE;
transition: all 1s ease;
}
body:hover {
perspective: 2000px;
}
body:hover > .yumburger{
padding-bottom: 110px;
}
.yumburger:hover{
transform: translate(-50%, -50%) translateZ(1px) rotateY(-8deg) rotateX(60deg) rotatez(5deg);}
.yumburger:hover > li:nth-child(35) {
transform: translateZ(100px) translatex(10px) rotatey(10deg) rotatex(0deg);
background-position: left -5px bottom -20px;}
.yumburger:hover > li:nth-child(31){
transform: translateZ(87px) translatey(50px) translatex(50px) rotateY(8deg) rotatex(-5deg);}
.yumburger:hover > li:nth-child(32){
transform: translateZ(89px) translatey(50px) translatex(50px) rotateY(8deg) rotatex(-5deg);}
.yumburger:hover > li:nth-child(33){
transform: translateZ(91px) translatey(50px) translatex(50px) rotateY(8deg) rotatex(-5deg);}
.yumburger:hover > li:nth-child(34){
transform: translateZ(92px) translatey(32px) translatex(57px) rotateY(8deg) rotatex(-5deg);}
.yumburger:hover > li:nth-child(27){
transform: translateZ(85px) translatey(70px) translatex(-20px) rotateY(-8deg) rotatex(-2deg);}
.yumburger:hover > li:nth-child(28){
transform: translateZ(87px) translatey(70px) translatex(-20px) rotateY(-8deg) rotatex(-2deg);}
.yumburger:hover > li:nth-child(29){
transform: translateZ(89px) translatey(70px) translatex(-20px) rotateY(-8deg) rotatex(-2deg);}
.yumburger:hover > li:nth-child(30){
transform: translateZ(91px) translatey(52px) translatex(-15px) rotateY(-8deg) rotatex(-2deg);}
.yumburger:hover > li:nth-child(25){
transform: translateZ(60px) rotate(60deg);}
.yumburger:hover > li:nth-child(26){
transform: translateZ(63px) rotate(60deg);}
.yumburger:hover > li:nth-child(18){
transform: translateZ(41px);}
.yumburger:hover > li:nth-child(19){
transform: translateZ(44px);}
.yumburger:hover > li:nth-child(20){
transform: translateZ(47px);}
.yumburger:hover > li:nth-child(21){
transform: translateZ(50px);}
.yumburger:hover > li:nth-child(22){
transform: translateZ(53px);}
.yumburger:hover > li:nth-child(23){
transform: translateZ(56px);}
.yumburger:hover > li:nth-child(24){
transform: translateZ(59px);}
.yumburger:hover > li:nth-child(14){
transform:translateZ(25px) translatey(30px) translatex(35px) rotateY(7.5deg);}
.yumburger:hover > li:nth-child(15){
transform:translateZ(27px) translatey(30px) translatex(35px) rotateY(7.5deg);}
.yumburger:hover > li:nth-child(16){
transform:translateZ(29px) translatey(30px) translatex(35px) rotateY(7.5deg);}
.yumburger:hover > li:nth-child(17){
transform:translateZ(30px) translatey(14px) translatex(42px) rotateY(7.5deg);}
.yumburger {
transition: all 1s ease;
position: absolute;
top: 50%;
left: 55%;
transform: translate(-50%, -50%) translateZ(1px) rotateY(0deg) rotateX(60deg);
list-style: none;
position: absolute;
background: #ccc;
border-radius: 50%;
width: 100px;
height: 100px;
padding: 100px;
transform-style: preserve-3d;
}
.yumburger li {
transition: all 1s ease 0.3s;
background: radial-gradient(circle, rgba(252,181,56,1) 48px, rgba(191,104,14,1) 72px, rgba(191,104,14,1) 100%);
background-size: 100% 200%;
border-radius: 50%;
display: block;
width: 100px;
height: 100px;
position: absolute;
background-position: left 0px bottom -29px;
}
/* Nested bun base(1 to 6) and salad (7 to 9)*/
.yumburger li:nth-child(1) {box-shadow: 0 0 0 1px #333, 0 0 2px 2px #333;border-top: solid 0.3px #000;transform: translateZ(2px)translateX(-1px);background-position: left 0px bottom -32px;}.yumburger li:nth-child(2) {border-top: solid 0.3px #000;background: radial-gradient(circle, rgba(252,181,56,1) 48px, rgba(191,104,14,1) 72px, rgba(191,104,14,1) 100%);background-size: 100% 200%;transform: translateZ(6px);background-position: left 0px bottom -35px;}.yumburger li:nth-child(3) {border-top: solid 0.3px #000;background: radial-gradient(circle, rgba(252,181,56,1) 48px, rgba(191,104,14,1) 72px, rgba(191,104,14,1) 100%);background-size: 100% 200%;transform: translateZ(9px);background-position: left 0px bottom -38px;}.yumburger li:nth-child(4) {border-top: solid 0.3px #000;background: radial-gradient(circle, rgba(252,181,56,1) 48px, rgba(191,104,14,1) 72px, rgba(191,104,14,1) 100%);background-size: 100% 200%;transform: translateZ(12px);background-position: left 0px bottom -41px;}.yumburger li:nth-child(7) {letter-spacing: -60px;color: #80b323;background:none;font-weight: bold;background-size: 100% 200%;-webkit-text-stroke: 2px #4d800c;font-size: 100px;margin: 35px -5px;transform: translateZ(19px) rotate(210deg);}.yumburger li:nth-child(8) {letter-spacing: -60px;color: #80b323;background:none;font-weight: bold;-webkit-text-stroke: 3px #4d800c;font-size: 100px;margin: 35px -5px;transform: translateZ(21px)rotate(210deg);}
/* Top 2 bun slices of bottom bun */
.yumburger li:nth-child(6) {
background: radial-gradient(circle,rgb(255, 209, 105) 45px, rgba(252,181,56,1) 48px, rgba(191,104,14,1) 72px, rgba(191,104,14,1) 100%);
background-size: 100% 200%;
background-position: left 0px bottom -47px;
transform: translateZ(18px);
border: solid 0.5px #000;}
.yumburger li:nth-child(5) {background: radial-gradient(circle, rgba(252,181,56,1) 48px, rgba(191,104,14,1) 72px, rgba(191,104,14,1) 100%);
background-size: 100% 200%;
background-position: left 0px bottom -44px;
transform: translateZ(15px);
}
/* Top salad */
.yumburger li:nth-child(9) {
color: #80b323;
background:none;
font-weight: bold;
-webkit-text-stroke: 4px #4d800c;
font-size: 100px;
margin: 35px -5px;
transform: translateZ(23px)rotate(210deg);
}
/* Nested 1st tomato 10 to 13*/
.yumburger li:nth-child(10) {border: solid 0.3px #000;background: #f85b1a;background-size: 100% 200%;background-position: left 0px bottom -44px;transform: translateZ(24px) translatey(20px) translatex(-4px);font-size: 100px;width: 70px;height:70px;}.yumburger li:nth-child(11) {background: #f85b1a;transform: translateZ(26px) translatey(20px) translatex(-4px);font-size: 100px;width: 70px;height:70px;}.yumburger li:nth-child(12) {border: solid 0.3px #000;background: #f85b1a;transform: translateZ(28px) translatey(20px) translatex(-4px);font-size: 100px;width: 70px;height:70px;}.yumburger li:nth-child(13) {color: #d03d1c;background: none;transform: translateZ(28px) translatey(4px) translatex(-3px);font-size: 70px;width: 70px;height:70px;}
/* 2nd tomato 14 to 17*/
.yumburger li:nth-child(14) {
border: solid 0.3px #000;
background: #f85b1a;
transform: translateZ(25px) translatey(30px) translatex(28px) rotateY(7.5deg);
font-size: 100px;
width: 70px;
height:70px;
}
.yumburger li:nth-child(15) {
background: #f85b1a;
background-size: 100% 200%;
background-position: left 0px bottom -44px;
transform: translateZ(27px) translatey(30px) translatex(28px) rotateY(7.5deg);
font-size: 100px;
width: 70px;
height:70px;
}
.yumburger li:nth-child(16) {
border: solid 0.3px #000;
background: #f85b1a;
transform: translateZ(29px) translatey(30px) translatex(28px) rotateY(7.5deg);
font-size: 100px;
width: 70px;
height:70px;
}
.yumburger li:nth-child(17) {
color: #d03d1c;
background:none;
transform: translateZ(29px) translatey(14px) translatex(35px) rotateY(7.5deg) ;
font-size: 70px;
width: 70px;
height:70px;
}
/* meaty meat 18 to 24*/
.yumburger li:nth-child(18){border-top:solid .3px #000;background:radial-gradient(circle,#d17d38 48px,#a3571b 72px,#a3571b 100%);background-size:100% 200%;background-position:left 0 bottom -26px;transform:translateZ(33px);border:solid .5px #000}.yumburger li:nth-child(19){border-top:solid .3px #000;background:radial-gradient(circle,#d17d38 48px,#a3571b 75px,#a3571b 100%);background-size:100% 200%;background-position:left 0 bottom -29px;transform:translateZ(36px)}.yumburger li:nth-child(20){border-top:solid .3px #000;background:radial-gradient(circle,#d17d38 48px,#a3571b 75px,#a3571b 100%);background-size:100% 200%;background-position:left 0 bottom -32px;transform:translateZ(39px)}.yumburger li:nth-child(21){border-top:solid .3px #000;background:radial-gradient(circle,#d17d38 48px,#a3571b 75px,#a3571b 100%);background-size:100% 200%;background-position:left 0 bottom -35px;transform:translateZ(42px)}.yumburger li:nth-child(22){border-top:solid .3px #000;background:radial-gradient(circle,#d17d38 48px,#a3571b 75px,#a3571b 100%);background-size:100% 200%;background-position:left 0 bottom -38px;transform:translateZ(45px)}.yumburger li:nth-child(23){border-top:solid .5px #000;background:radial-gradient(circle,#d17d38 48px,#a3571b 75px,#a3571b 100%);background-size:100% 200%;background-position:left 0 bottom -41px;transform:translateZ(48px)}.yumburger li:nth-child(24){border:solid .5px #000;background:#d17d38;background-size:100% 200%;background-position:left 0 bottom -46px;transform:translateZ(51px) translatex(-1px)}
/* cheese */
.yumburger li:nth-child(25){border-bottom:solid .5px #000;border-right:solid .5px #000;background:radial-gradient(circle,#ffe33b 48px,#ffd015 75px,#ffd015 100%);background-size:100% 200%;border-radius:0;width:90px;height:90px;background-position:left 0 bottom -44px;transform:translateZ(52px) translatex(5px) translatey(5px) rotate(60deg)}.yumburger li:nth-child(26){border-top:solid .5px #000;border-left:solid .5px #000;border-bottom:solid .5px #dd8a15;border-right:solid .5px #dd8a15;background:radial-gradient(circle,#ffe33b 48px,#ffd015 75px,#ffd015 100%);background-size:100% 200%;border-radius:0;width:90px;height:90px;background-position:left 0 bottom -44px;transform:translateZ(55px) translatex(5px) translatey(5px) rotate(60deg)}
/*2nd layer first tomato 27 to 30 */
.yumburger li:nth-child(27){border:solid .3px #000;background:#f85b1a;transform:translateZ(56px) translatey(33px) translatex(-1px);font-size:100px;width:70px;height:70px}.yumburger li:nth-child(28){background:#f85b1a;background-size:100% 200%;background-position:left 0 bottom -44px;transform:translateZ(58px) translatey(33px) translatex(-1px);font-size:100px;width:70px;height:70px}.yumburger li:nth-child(29){border:solid .3px #000;background:#f85b1a;transform:translateZ(60px) translatey(33px) translatex(-1px);font-size:100px;width:70px;height:70px}.yumburger li:nth-child(30){color:#d03d1c;background:none;transform:translateZ(60px) translatey(17px) translatex(4px) rotateY(0);font-size:70px;width:70px;height:70px}
/*2nd layer second tomato 31 to 34*/
.yumburger li:nth-child(31){border:solid .3px #000;background:#f85b1a;transform:translateZ(57px) translatey(30px) translatex(35px) rotateY(7.5deg) rotatex(0deg);font-size:100px;width:70px;height:70px}.yumburger li:nth-child(32){background:#f85b1a;background-size:100% 200%;background-position:left 0 bottom -44px;transform:translateZ(59px) translatey(30px) translatex(35px) rotateY(7.5deg) rotatex(0deg);font-size:100px;width:70px;height:70px}.yumburger li:nth-child(33){border:solid .3px #000;background:#f85b1a;transform:translateZ(61px) translatey(30px) translatex(35px) rotateY(7.5deg) rotatex(0deg);font-size:100px;width:70px;height:70px}.yumburger li:nth-child(34){color:#d03d1c;background:none;transform:translateZ(61px) translatey(14px) translatex(40px) rotateY(7.5deg) rotatex(0deg);font-size:70px;width:70px;height:70px}
/* top bun */
.yumburger li:nth-child(35) {
background: radial-gradient(circle,rgb(255, 209, 105) 20px, rgba(252,181,56,1) 48px, rgba(191,104,14,1) 72px, rgba(191,104,14,1) 100%);
background-size: 100% 200%;
background-position: left 1px bottom -17px;
transform: translateZ(66px) translatey(7px);
border: solid 0.5px #000;}
/* DON'T TOUCH THE BURGER!
This is available to buy as an NFT on BeyondNFT
https://beyondnft.io/explore/0x96f78596317f7836ab2ffb4012efe18fd899c60d/5/0x5cf360339cf919f4fc72d3f0b86ecf6dd77aafb1
Also see: Tab Triggers