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>
<li>
<a href="https://note.com/reshine/n/ne1382a28f132" target="_blank" rel="noopener">
<div class="visual"><img src="https://assets.st-note.com/production/uploads/images/62162165/rectangle_large_type_2_22f24324c8a1523432b98838e1853194.png" alt=""></div>
<div class="header">フリーランス・副業の手引き</div>
<div class="body">この記事では、マガジン「フリーランスの教科書」で連載してきた記事の総集編として、エンジニアの方がフリーランス・副業を開始・継続するにあたって、知っておいた方が良い考え方を、フリーランス・副業のフェーズ毎に整理したいと思います。</div>
<div class="footer">re:shine | フリーランス・副業を応援</div>
</a>
</li>
<li>
<a href="https://note.com/reshine/n/n422956805955" target="_blank" rel="noopener">
<div class="visual"><img src="https://assets.st-note.com/production/uploads/images/58700427/rectangle_large_type_2_683c590ba867124611fb002aee3b4d49.png" alt=""></div>
<div class="header">フリーランスとして独立を考えているエンジニアが知っておくべきこと</div>
<div class="body">re:shineでは、つい先日、「フリーランス独立支援プログラム」という新たな試みを始めました。そのご紹介も後半でさせていただきたいと思います。</div>
<div class="footer">re:shine | フリーランス・副業を応援</div>
</a>
</li>
<li>
<a href="https://note.com/reshine/n/n1496cd464ea0" target="_blank" rel="noopener">
<div class="visual"><img src="https://assets.st-note.com/production/uploads/images/57649533/rectangle_large_type_2_b1195669e1852aaffab11095c7e04cde.png" alt=""></div>
<div class="header">Vue3導入とフロントエンド設計の大改革【開発録 Vol.2】</div>
<div class="body">フロントエンド設計の大幅改善UIの一新だけでも大きな変更なのですが、実は、単なるUI一新や機能追加だけではなく、フロントエンドの設計を大幅に変更した、大規模リニューアルでした。</div>
<div class="footer">re:shine | フリーランス・副業を応援</div>
</a>
</li>
<li>
<a href="https://note.com/reshine/n/nbd7ab915bc55" target="_blank" rel="noopener">
<div class="visual"><img src="https://assets.st-note.com/production/uploads/images/56752082/rectangle_large_type_2_f7460db3e6bafa4d7b1d3b8b395ad6bd.png" alt=""></div>
<div class="header">収入を得るだけがフリーランス・副業の目的ではない - エンジニア視点で考える</div>
<div class="body">昨今、働き方の多様化が進んでいる中で、フリーランスや副業として働くことを検討・開始する方が増えてきていますが、ひとえにフリーランス・副業といっても、働く目的は様々です。この記事では、エンジニアがフリーランス・副業として働く目的の中から、代表的なものをピックアップし、それぞれの目的に合った働き方を紹介したいと思います。</div>
<div class="footer">re:shine | フリーランス・副業を応援</div>
</a>
</li>
<li>
<a href="https://note.com/reshine/n/n732fab4eebdf" target="_blank" rel="noopener">
<div class="visual"><img src="https://assets.st-note.com/production/uploads/images/55347227/rectangle_large_type_2_c0365be8127ec1de254c5cf72a7a4a11.png" alt=""></div>
<div class="header">知らない誰かの話より、元同僚の一言</div>
<div class="body">この記事では、フリーランスや副業で、継続的に仕事の依頼が来る状態、つまり売れっ子になるための考え方を紹介します。</div>
<div class="footer">re:shine | フリーランス・副業を応援</div>
</a>
</li>
<li>
<a href="https://note.com/reshine/n/n43f0ffa7ae6a" target="_blank" rel="noopener">
<div class="visual"><img src="https://assets.st-note.com/production/uploads/images/54759036/rectangle_large_type_2_136a4a9e649c1649ae10a4ce63dcf59a.png" alt=""></div>
<div class="header">フリーランス、副業、正社員。それぞれのメリットとは - エンジニア視点で考える</div>
<div class="body">昨今、働き方の多様化が進んでいる中で、フリーランスや副業、パラレルワーク(複業)などのキーワードにも大きな注目が集まっています。今まで正社員として働いてきた方々も、このようなワードに興味・関心を持ち始めた方が多くいらっしゃることと思います。</div>
<div class="footer">re:shine | フリーランス・副業を応援</div>
</a>
</li>
</ul>
body {
margin: 0;
padding: 10px 0;
}
ul {
list-style: none;
display: flex;
flex-wrap: wrap;
gap: 20px;
width: 520px;
margin: 0 auto;
padding: 0;
}
li {
display: flex;
width: 160px;
margin: 0;
padding: 0;
}
a {
display: flex;
flex-direction: column;
overflow: hidden;
border-radius: 4px;
background-color: #fff;
}
a:link, a:visited {
color: inherit;
text-decoration: inherit;
}
.visual img{
width: 100%;
}
.header {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
height: 4.5em;
font-weight: bold;
}
.body {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
height: 4.5em;
}
.footer {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
height: 3em;
margin-top: 0.75em;
border-top: dotted #ccc 1px;
}
Also see: Tab Triggers