盘点那些CSS框架,你都用过哪些?

使用响应式CSS框架帮助我们减少大量的工作,我们可以不必去编写重复的CSS样式,提升开发效率。并且现在有着大量的开源的CSS框架可供我们使用。下面我列出的这些都是开源免费的。如果您还用有更好的选择欢迎在评论区告诉大家。

1. Bootstrap

大名鼎鼎的Bootstrap相信没有人没用过吧,Bootstrap是最被广泛的使用的CSS框架,它免费开源,至今仍有数百万网站在使用。

image-20210925135516097

主要特性:

  • 支持SASS变量和Mixins
  • 支持响应式网格系统
  • 有很多内置组件供使用
  • 基于jQuery的强大插件

2. Tailwind

Tailwind是一个比较新的CSS框架,与其他框架不同,它并不提供内置的组件,而是提供很多基础的工具class,供我们去使用。

image-20210925135454031

举个例子

<button class="bg-blue hover:bg-blue-dark text-white font-bold py-2 px-4 rounded">
  Button
</button>

通过在button的class上写Tailwind提供的基础class,可以实现一个精美的按钮。

相比Bootstrap而言,它的灵活性很强,我们可以实现不同的按钮样式,不像Bootstrap,如果不修改默认样式,每个网站的按钮都差不多。令人一眼就看出是用了Bootstrap。

但其长长的class也让人头疼,有点像在直接写style,你喜欢这个框架吗?欢迎在评论区说出你的想法

<ul class="space-y-4">
  <li>
    <div class="w-64 h-3 bg-gradient-to-br from-fuchsia-500 to-purple-600"></div>
  </li>
  <li>
    <div class="w-56 h-3 bg-gradient-to-br from-fuchsia-500 to-purple-600"></div>
  </li>
  <li>
    <div class="w-48 h-3 bg-gradient-to-br from-fuchsia-500 to-purple-600"></div>
  </li>
</ul>

3. Bulma

Bulma经过Gzip后只有21kb,它采用移动端优先的思想构建,每个元素都针对垂直阅读进行了优化,它的网格系统完全由flexbox实现。

image-20210925135415683

Bulma也是使用SASS构建的,我们可以引入我们项目中需要的部分即可。

4. UI Kit

ui kit是一个轻量化的响应式CSS框架,用来快速开发web应用。

image-20210925135337269

ui kit简单易用,提供了网格系统、自定义图标、组件、动画等等,并且与Less和Sass兼容。

5. Semantic UI

Semantic UI和Bootstrap有很多的相似之处,其拥有语义化的HTML结构和class命名方式。同样提供基于jQuery的插件,用来实现动态的功能。

image-20210925135300563

6. Spectre

最轻量的CSS框架,Gzip后只有10kb,提供基础的设计组件,基于flex布局,具有响应式和移动端优先的特点。

image-20210925134847568

相比Bootstrap这个大而全的框架,对于简单的web应用也可以选择这种小巧、轻量的框架。

总结

所有的框架都有不同的优缺点,我们可以根据实际的项目需要选择适合的CSS框架,来帮助我们快速构建Web应用。

我的见识有限,列举的只是冰山一角,如果我错过了一些好用伟大的框架,请随时发表评论,让每个人都知道它。

觉得文章不错,欢迎关注公号【前端工程师的自我修养】,每天更新一篇有用的内容。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
很好用的CSS,960 Grid System Version 1.5 2010-05-11 Created by Nathan Smith. See the official site for more info: http://960.gs/ ============================================================================ Thank you for downloading the 960 Grid System. I hope it helps to streamline web development workflow. Enclosed in the bundle are printable sketch sheets and template files for Adobe Fireworks and Photoshop, OmniGraffle and Visio. Also included is a lightweight CSS file, which contains the grid dimensions. To use this file, simply include the 960.css in the <head> of the HTML page. You may also use the reset.css and text.css files, or opt to leave them out. Here is an example of the XHTML code necessary to incorporate the CSS files: <head> <link rel="stylesheet" type="text/css" media="all" href="css/reset.css" /> <link rel="stylesheet" type="text/css" media="all" href="css/text.css" /> <link rel="stylesheet" type="text/css" media="all" href="css/960.css" /> </head> It is worth noting that these styles do not automatically make up a finished site design. They are simply a starting point, ideally for rapid prototyping or as a basis for creating your own designs. You should not feel constrained by the way I have built the initial code. If you disagree with how something has been done, feel free to revise it for the needs of your particular site. The files in the 960 Grid System are free of charge, licensed under GPL/MIT. ============================================================================ Note that if you are building a site in a language which reads from right to left, use the CSS files that begin with "rtl_" instead. Denote the language: <html lang="..." dir="rtl"> Be sure to replace "..." with the appropriate two-letter abbreviation of the language you are using. Example: lang="he" for Hebrew, lang="ar" for Arabic. ============================================================================ Special thanks to Eric Meyer for his comprehensive browser reset stylesheet. http://meyerweb.com/eric/tools/css/reset/

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值