CSS 床:可作为网页开发起点的无类 CSS 主题
CSS Bed: Classless CSS themes to use as starting points in web development

原始链接: https://www.cssbed.com

CSSBed 是一组轻量级、无类名的 CSS 主题,可作为网页开发的起点。由于这些主题直接为标准 HTML 元素设置样式,用户无需学习特定框架的类名,也不需要编写大量自定义 CSS,就能构建页面。它们具备响应式特性,体积小巧——通常只有几 KB——并兼容大多数现代浏览器。要应用某个主题,只需将其 CSS 代码片段粘贴到网站的 `` 中,并加入响应式视口 meta 标签。 该页面作为主题演示,展示表单、按钮、代码、引用块、ASCII 艺术、表格、排版、标题、列表、链接、联系链接和段落。它还介绍了无类名主题的优势,并提供指向项目源代码、GitHub 仓库、其他主题版本以及最初 Hacker News 讨论的链接。

The Hacker News 的讨论帖介绍了 CSS Bed,这是一个无类 CSS 主题合集,旨在为简单页面提供快速的起点。评论者认为,无类样式表适合快速原型开发、小型静态或个人项目,也适合在不搭建组件系统的情况下,建立基础的排版、间距、颜色和品牌风格。讨论中提到了 Pico.css、Simple.css、Chota.css 和 Holiday.css,而 `@layer` 则让组合和覆盖不同框架变得更加容易。 怀疑者认为,大多数实际项目很快就会需要类名;而现成的无类主题通常会营造出类似 Bootstrap 或 Tailwind 的通用化设计。其他批评还包括排版不够好、按钮效果不具说服力、缺乏深色模式或已访问链接支持、移动端边距不合理、出现横向溢出,以及尽管文件大小达到 80–120 KB,却仍宣称“轻量”的问题一些人仍然认为重置样式很有用,并更偏好自行编写极简 CSS。还有人提出安全担忧:据报道,其中一个主题曾加载已被攻破的上游样式表 URL,导致返回了非预期的 HTML。总体而言,支持者更看重速度和简洁,而不是独特且精致的设计。
相关文章

原文

This is a collection of classless css themes to use as starting points in web development.

Source behind this one.

How do I get this theme?

Paste into your website's <head> this snippet.

Found a bug? Want to add a theme to the list? See cssbed source on github

See this same page in a different classless theme

Why use classless themes?

  • Responsive
  • Good browser support
  • Beautiful
  • Small size (< a few kb) - you don't waste bytes on every widget imaginable
  • No learning curve - use HTML as you would normally instead of going to the docs to learn which class does what and having to fight the framework otherwise.
  • Original Hacker News Thread

Is it responsive?

Heck yeah! It doesn't include any fancy styles so it's easily mobile responsive. Just add the famous responsive viewport tag and you'll be good to go!

In fact, try resizing this page. Everything flows super nicely as you'll see.

Element demos

This is supposed to be a demo page so we need more elements!

Form elements

Code

Below is some code, you can copy it with Ctrl-C. Did you know, alert(1) can show an alert in JavaScript!

// This logs a message to the console
console.log('Hello, world!')

Other

Here's a horizontal rule and image because I don't know where else to put them.

Example kitten

This is a or a more formal

This is a blockquote
      Good old preformatted text, no code at all
      
       |\_/|        ****************************    (\_/)
      / @ @ \       *  "Purrrfectly pleasant"  *   (='.'=)
     ( > º >x

    

And here's a nicely marked up table!

Name Quantity Price
Godzilla 2 $299.99
Mozilla 10 $100,000.00
Quesadilla 1 $2.22

Typography

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dictum hendrerit velit, quis ullamcorper sem congue ac. Quisque id magna rhoncus, sodales massa vel, vestibulum elit. Duis ornare accumsan egestas. Proin maximus lacus interdum leo molestie convallis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Ut iaculis risus eu felis feugiat, eu mollis neque elementum. Donec interdum, nisl id dignissim iaculis, felis dui aliquet dui, non fermentum velit lectus ac quam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. This is strong, this is normal, this is just bold, and this is emphasized! And heck, here's a link.

"The HTML blockquote Element (or HTML Block Quotation Element) indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation (see Notes for how to change it). A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the &ltcite&gt cite element."
MDN, "The Block Quotation element"
  • Unordered list item 1
  • Unordered list item 2
  • Unordered list item 3
  1. Ordered list item 1
  2. Ordered list item 2
  3. Ordered list item 3

Links with mailto:, tel:, sms: addresses might be styled...

[email protected]
778-330-2389
666-666-6666

A paragraph <p> of lorem ipsum after the heading. Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

Heading 2

A paragraph <p> of lorem ipsum after the heading. Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

Heading 3

A paragraph <p> of lorem ipsum after the heading. Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

Heading 4

A paragraph <p> of lorem ipsum after the heading. Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

Heading 5

A paragraph <p> of lorem ipsum after the heading. Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

Heading 6

A paragraph <p> of lorem ipsum after the heading. Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

联系我们 contact @ memedata.com