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.
<!-- odpowiedź na https://forum.pasja-informatyki.pl/499608/nakladanie-blur-na-elementy-css -->
<div class="blured-wrapper"></div>
<!-- Treść strony -->
<article>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Magni suscipit sed soluta alias eos quo possimus, fugit molestias ratione, laudantium autem ullam commodi tempora fuga id tenetur quidem. Neque, recusandae!</p>
<p>A recusandae distinctio fuga dicta obcaecati explicabo? Eaque dicta quod nam, distinctio voluptas eveniet. Fugit magnam sed quia harum consectetur deserunt nesciunt. Hic possimus perspiciatis omnis corrupti blanditiis sunt debitis.</p>
<p>Consequatur eligendi libero sapiente aliquam culpa soluta quidem numquam illo nisi enim, debitis delectus? Necessitatibus est quisquam optio vitae provident dicta iure dolores vel saepe illum, autem molestias, expedita sint.</p>
<p>Earum autem labore recusandae, sequi debitis quo quisquam ad mollitia omnis tempora error cupiditate quae atque accusamus qui exercitationem quaerat non enim in esse itaque culpa laboriosam. Numquam, rerum odit.</p>
<section class="content-without-blur">
Ten element jest bez blura :)
</section>
<p>Vel, dolorem? Ratione, atque nihil dolorem libero temporibus in incidunt sit ex reiciendis quisquam praesentium, eligendi et odit labore illum quasi velit recusandae cupiditate, dolores blanditiis nemo quos alias? Mollitia!</p>
<p>Illo perferendis cupiditate nulla, omnis voluptatibus deleniti magnam a recusandae minus necessitatibus ut earum odit in voluptatum corporis aperiam sunt, nemo eveniet autem voluptates. Ipsa recusandae nisi rem error. Quia?</p>
<p>Commodi ipsum debitis laboriosam possimus cumque nam alias aperiam, accusamus libero veritatis minima dolorum veniam doloremque earum soluta magni voluptatem suscipit iure eveniet culpa. Beatae culpa quidem ratione sunt suscipit?</p>
<p>Error voluptate repellendus adipisci magnam sapiente porro molestiae. Perferendis sit, voluptates provident atque quod similique quaerat tempora incidunt saepe, cumque eius commodi quae ad in. Blanditiis nesciunt itaque quam dicta.</p>
<p>Aut suscipit a facere doloribus voluptatibus. Dicta laboriosam architecto officia illo reprehenderit eius at est, delectus ducimus veritatis sapiente! Autem expedita perspiciatis consequuntur, assumenda aperiam velit laborum nam dolor exercitationem!</p>
<p>Voluptatibus enim, illum error ratione necessitatibus eveniet at debitis? Iste mollitia quidem corrupti quasi iusto ducimus accusantium, beatae deserunt velit nam culpa libero sunt, soluta vitae quos a incidunt repellat!</p>
<p>Nam amet modi voluptate delectus similique pariatur vitae magnam, voluptates nemo iusto accusantium in consequatur neque cumque eius deserunt assumenda ut cum architecto omnis. Molestias quos dolorum eos aliquam accusantium!</p>
<p>Rerum cum ipsam modi repudiandae itaque vel tempora adipisci nemo quam exercitationem nulla, ab eum velit iste corporis molestias at ullam quasi sed enim repellendus magnam nisi unde voluptatum. Aut?</p>
<p>Quae esse, expedita hic perspiciatis ea dolore blanditiis reiciendis maxime asperiores ipsa aut a autem laborum rerum molestiae facere, numquam, molestias inventore ullam. Harum, provident dicta. Qui deserunt animi officiis?</p>
<p>Molestiae facere adipisci placeat sapiente harum corporis? Consequuntur eaque quaerat numquam nihil ipsum neque modi repudiandae, deserunt, iste aspernatur quae labore expedita est eveniet dolor a. Ea mollitia facilis animi.</p>
<p>Eligendi necessitatibus ut quidem! Reprehenderit laudantium iure eos iusto cum esse alias laborum sunt expedita illo. Quisquam ea dicta nisi laboriosam ipsum aliquid vel cumque necessitatibus optio deserunt. Consequuntur, facilis!</p>
<p>Exercitationem, praesentium vitae vel, quia odio autem obcaecati beatae ut quis qui libero, distinctio aspernatur facilis voluptates! Itaque velit rem cum soluta nihil quod nostrum, blanditiis ullam modi porro qui!</p>
<p>Eaque sapiente, repudiandae ut porro commodi aspernatur velit quas ad quaerat, aut iste maxime animi maiores sed dignissimos nostrum quisquam voluptatibus consequatur labore, vel tempore corporis. Aspernatur architecto explicabo autem.</p>
<p>Cum enim sapiente voluptates ratione, maxime totam sed accusantium similique! Accusantium possimus voluptates natus. Eos, impedit dolore iste, aspernatur ipsam aliquam, magnam repellat laborum labore natus cumque quasi aliquid facere.</p>
<p>Tenetur consequuntur quis fugit assumenda possimus? Iste dolor praesentium vel delectus dolorem ullam natus ducimus eius quasi? Atque, eaque. Veniam voluptatum aperiam ut! Ad ducimus ut eius excepturi facere saepe.</p>
<p>Temporibus eos reiciendis aut maxime recusandae at voluptate natus doloremque deserunt repellendus! Pariatur ab itaque molestiae possimus aliquid, fuga dolorum, ipsa, at praesentium quam nam reiciendis sit repudiandae sed voluptatem?</p>
</article>
.blured-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,.4);
backdrop-filter: blur(4px);
z-index: 9;
}
.content-without-blur {
position: relative;
z-index: 10;
background: tomato;
padding: 2rem;
}
Also see: Tab Triggers