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="arkaplan"></div>
<div class="ornek">
<h1>Scroll down</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio est, vulputate sit amet ipsum at, pharetra pharetra est. Etiam aliquam mauris sapien. Aenean ullamcorper egestas tempor. Duis elit justo, accumsan id auctor a, fringilla in risus. Sed ac magna varius diam mollis mollis sit amet at velit. Aliquam erat volutpat. Proin vitae leo a elit sodales mattis. Quisque eleifend a turpis nec accumsan. Curabitur ac odio pellentesque, eleifend arcu quis, eleifend diam. Aliquam bibendum placerat iaculis. Maecenas ultrices metus eget purus tincidunt lacinia. Nullam eu magna sit amet lectus mattis lobortis vitae vitae ex. Donec venenatis sodales lorem vitae volutpat. Cras at purus ac ipsum convallis laoreet. In ultricies ipsum eu ligula rutrum ultrices. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;
</p>
<p>
Vestibulum sagittis, tortor eget malesuada aliquam, risus ex porta velit, non tincidunt nisl mi in metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce et imperdiet arcu, nec auctor mauris. Nam commodo rhoncus felis, et aliquam eros auctor nec. Integer interdum malesuada augue, eget commodo metus auctor eget. Etiam bibendum interdum nisi, vel faucibus augue. Nulla vulputate congue nisl, vel sollicitudin arcu aliquam at. Duis non faucibus quam, eu tempus enim. Curabitur nec lectus varius, elementum lorem id, suscipit lectus. In tristique enim enim, ac suscipit dui efficitur id. Nam lacinia cursus felis nec pulvinar. Sed nec magna tortor. Vestibulum ante mauris, malesuada et sapien et, convallis rhoncus tortor. Sed scelerisque nunc nec suscipit euismod. Nulla cursus, nibh vitae viverra facilisis, mauris velit faucibus magna, at laoreet nisl urna vitae erat.
</p>
<p>
Aliquam feugiat justo a dui scelerisque ultrices. Vivamus a viverra nisl. Ut sodales, odio sed eleifend tempus, nulla odio blandit neque, et euismod lectus nunc vel dui. Pellentesque ac ipsum laoreet, efficitur massa ac, dictum nisl. Nulla tincidunt dictum vehicula. Fusce iaculis bibendum ante, quis molestie sapien rhoncus sit amet. Mauris congue volutpat turpis et facilisis. Aliquam ut dui euismod, iaculis turpis eget, blandit neque. Fusce ornare diam sit amet posuere porttitor.
</p>
<p>
Nunc laoreet lorem id lacus ultricies, malesuada scelerisque lorem consectetur. Duis in gravida mauris. Donec nec mollis orci. Ut non quam diam. Nulla bibendum porta urna, quis malesuada ante venenatis scelerisque. Sed ac nulla lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec est sollicitudin libero posuere lacinia. Duis suscipit felis sit amet nisl aliquet, id tempor nunc ullamcorper. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris blandit tortor lorem, eget congue augue ultricies vitae. Ut vitae nulla libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed at posuere est. Phasellus sit amet interdum elit, et ornare sem. Sed nec neque vitae sem eleifend scelerisque non ac ex.
</p>
<p>
Nunc laoreet lorem id lacus ultricies, malesuada scelerisque lorem consectetur. Duis in gravida mauris. Donec nec mollis orci. Ut non quam diam. Nulla bibendum porta urna, quis malesuada ante venenatis scelerisque. Sed ac nulla lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec est sollicitudin libero posuere lacinia. Duis suscipit felis sit amet nisl aliquet, id tempor nunc ullamcorper. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris blandit tortor lorem, eget congue augue ultricies vitae. Ut vitae nulla libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed at posuere est. Phasellus sit amet interdum elit, et ornare sem. Sed nec neque vitae sem eleifend scelerisque non ac ex.
</p>
<p>
Nunc laoreet lorem id lacus ultricies, malesuada scelerisque lorem consectetur. Duis in gravida mauris. Donec nec mollis orci. Ut non quam diam. Nulla bibendum porta urna, quis malesuada ante venenatis scelerisque. Sed ac nulla lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec est sollicitudin libero posuere lacinia. Duis suscipit felis sit amet nisl aliquet, id tempor nunc ullamcorper. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris blandit tortor lorem, eget congue augue ultricies vitae. Ut vitae nulla libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed at posuere est. Phasellus sit amet interdum elit, et ornare sem. Sed nec neque vitae sem eleifend scelerisque non ac ex.
</p>
</div>
body{padding:0;margin:0;font-family: 'Roboto', sans-serif;}
.arkaplan {
position:fixed;
top:0;
z-index:0;
width:100%;
padding-top:50%;
background: url(http://www.adobewordpress.com/tasarim/images/sky-background.jpg) center center no-repeat;
transform:scale(1);
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.ornek{
position:absolute;
background-color:rgba(255,255,255,1);
left:0;
right:0;
top:0;
margin-left:auto;
margin-right:auto;
width:50%;
padding: 60px 40px;
}
.ornek h1{
color:#3498db;
}
.ornek p{
color:#34495e;
}
$(window).scroll(function(e) {
var scrollSeviye = $(this).scrollTop();
if(scrollSeviye>2400){
scrollSeviye=2400;
}
var buyutme=(scrollSeviye/6000)+1;
$('.arkaplan').css('-webkit-filter', 'blur('+scrollSeviye/120+'px)');
$('.arkaplan').css('transform', 'scale('+buyutme+')');
});
Also see: Tab Triggers