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="fixed">
<h1>飯粒範例</h1>
<h2>Fixed 卡住</h2>
</div>
<div class="scroll">
<h2>scroll 正常</h2>
<p>
當談到飯粒時,對於台灣人來說,這不僅僅是一種糧食,更是文化、歷史和生活的一部分。飯粒在台灣有著特殊的地位,它不僅供應我們的食物需求,還反映了我們的價值觀和傳統。
</p>
<p>
首先,讓我們談談飯粒的來源。在台灣,主要的穀物包括稻米和小麥。其中,稻米是最受歡迎的穀物,也是台灣飲食的基礎。稻米的種植歷史可以追溯到數百年前,它不僅提供了糧食,還創造了農村社區,形成了農村文化的重要一環。
</p>
<p>
在台灣的餐桌上,白飯是不可或缺的一部分。它是我們日常飲食的主食,伴隨著各種菜餚,從簡單的炒飯到精緻的壽司。不僅如此,飯粒也在台灣的傳統節慶中扮演著重要的角色。例如,中秋節時,人們習慣性地品嚐著美味的月餅,而月餅的內餡就是用糯米製成的。這種飯粒製成的月餅象徵著家庭的團圓和和諧,是一個重要的象徵。
</p>
<p>
飯粒也反映了台灣人的生活方式和價值觀。在台灣,我們有著一個重要的禮儀,那就是「不浪費食物」。這意味著我們要珍惜每一粒飯,不浪費糧食。這種價值觀在台灣社會中根深蒂固,也體現在我們的飲食習慣中。我們會盡量吃光盤中的所有飯菜,並尊重食物的價值。
</p>
<p>
飯粒還在台灣的宗教和儀式中扮演著重要的角色。在一些宗教儀式中,人們會獻上飯粒作為供品,以表達對神明的虔誠。這種儀式不僅是宗教信仰的體現,也是文化傳承的一部分。
</p>
</div>
<div class="local">
<h2>local 自己動</h2>
<p>
飯粒也反映了台灣人的生活方式和價值觀。在台灣,我們有著一個重要的禮儀,那就是「不浪費食物」。這意味著我們要珍惜每一粒飯,不浪費糧食。這種價值觀在台灣社會中根深蒂固,也體現在我們的飲食習慣中。我們會盡量吃光盤中的所有飯菜,並尊重食物的價值。
</p>
<p>
飯粒還在台灣的宗教和儀式中扮演著重要的角色。在一些宗教儀式中,人們會獻上飯粒作為供品,以表達對神明的虔誠。這種儀式不僅是宗教信仰的體現,也是文化傳承的一部分。
</p>
<p>
最後,我們不能忽視飯粒在台灣經濟中的作用。稻米是台灣的主要農產品之一,它的種植和收穫創造了就業機會,支持了農村經濟。此外,稻米的出口也為台灣帶來了經濟收益,使其成為一個重要的國際貿易商品。
</p>
<p>
總結來說,飯粒在台灣不僅僅是一種食物,它代表著文化、傳統、價值觀和經濟。它是台灣社會不可或缺的一部分,對我們的生活產生著深遠的影響。因此,無論是在餐桌上還是在日常生活中,我們都應該珍惜飯粒,體現對這個特殊食物的尊重和感激之情。
</p>
</div>
<p>
當談到飯粒時,對於台灣人來說,這不僅僅是一種糧食,更是文化、歷史和生活的一部分。飯粒在台灣有著特殊的地位,它不僅供應我們的食物需求,還反映了我們的價值觀和傳統。
</p>
<p>
首先,讓我們談談飯粒的來源。在台灣,主要的穀物包括稻米和小麥。其中,稻米是最受歡迎的穀物,也是台灣飲食的基礎。稻米的種植歷史可以追溯到數百年前,它不僅提供了糧食,還創造了農村社區,形成了農村文化的重要一環。
</p>
<p>
在台灣的餐桌上,白飯是不可或缺的一部分。它是我們日常飲食的主食,伴隨著各種菜餚,從簡單的炒飯到精緻的壽司。不僅如此,飯粒也在台灣的傳統節慶中扮演著重要的角色。例如,中秋節時,人們習慣性地品嚐著美味的月餅,而月餅的內餡就是用糯米製成的。這種飯粒製成的月餅象徵著家庭的團圓和和諧,是一個重要的象徵。
</p>
<p>
飯粒也反映了台灣人的生活方式和價值觀。在台灣,我們有著一個重要的禮儀,那就是「不浪費食物」。這意味著我們要珍惜每一粒飯,不浪費糧食。這種價值觀在台灣社會中根深蒂固,也體現在我們的飲食習慣中。我們會盡量吃光盤中的所有飯菜,並尊重食物的價值。
</p>
<p>
飯粒還在台灣的宗教和儀式中扮演著重要的角色。在一些宗教儀式中,人們會獻上飯粒作為供品,以表達對神明的虔誠。這種儀式不僅是宗教信仰的體現,也是文化傳承的一部分。
</p>
<p>By ChatGPT</p>
div {
background: url(https://images.unsplash.com/photo-1536304993881-ff6e9eefa2a6);
height: 50vh;
width: calc(50% - 2rem);
background-size: cover;
background-attachment: fixed;
color: #fff;
overflow-y: scroll;
}
.fixed {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.scroll {
background-attachment: scroll;
}
.local {
background-attachment: local;
}
body {
display: flex;
flex-wrap: wrap;
gap: 2rem;
background: #ffedba;
}
Also see: Tab Triggers