Home >Web Front-end >CSS Tutorial >How to use CSS framework reasonably?

How to use CSS framework reasonably?

Guanhui
Guanhuiforward
2020-06-19 17:58:233046browse

How to use CSS framework reasonably?

The style of today’s websites is very different from what they looked like long ago. If you go back and look at the original website UI of some companies now, I think it would be difficult for most Internet users to recognize it. So thanks to innovations in web design technology, now websites can not only display information, they can also have interesting animations, diverse layouts and interactive elements. Among them, most of these are implemented by CSS.

So the emergence of CSS has injected vitality into the originally mediocre web pages. This is why the user experience of the website has further evolved. This may be one of the reasons why almost all websites today use CSS to some extent.

This year, some CSS technologies are setting off a new technological innovation, such as: Flexbox. Although 83% of page loads on Google Chrome use Flexbox, another new competitor called Grid is also developing. Slowly becoming popular. There are also technologies such as CSS Writing-Mode, mobile animations, single-page websites, flexible fonts and scroll capture that may also have an impact.

But in this article, we will not discuss the similarities and differences between different CSS technologies, but mainly introduce the CSS framework. They have only become popular in the past few years, but more and more developers are already using them.

What is the CSS framework?

We define CSS as a design language that provides help for the UI design of HTML documents. There are many advantages to designing with CSS, and it can be used with any type of XML, including XUL and SVG. A CSS framework is like a ready-made package of files that can serve as the basis for a website's structure.

There are many benefits to using a framework. Here are some of them:

  • #Save Time: This is one of the most prominent advantages. Using CSS frameworks, developers don't have to start from scratch when building an app or website. They can free up their study time to focus on other important work, such as UI design, mobileization, and solving specific browser compatibility issues.

  • Code reusability: If your project is a large project with many pages and will continue to be updated in the future, then the use of the framework will be beneficial to you. Very useful. It can be said that a framework with powerful reusability features can significantly shorten the preparation cycle of your project.

  • Cross-browser issues: For a long time, dealing with access differences between browsers has been the most troublesome thing for front-end developers. However, the CSS framework can discover and resolve differences between browsers for you in advance to ensure that you can run without differences in any browser.

  • Standard structure ensures consistency: Front-end frameworks usually consist of CSS, HTML, and JavaScript files that help ensure that all page elements such as design and form, etc.) consistency.

##Excellent CSS framework

##Bootstrap

Bootstrap was originally created by Twitter Blueprint as a tool for internal use by teams. But after its public release, it became widely used by developers and its usage continued to grow.

Bootstrap provides design templates for alert windows, buttons, carousels, drop-down menus, forms and other elements. Bootstrap’s mobile-first feature makes it easy to create responsive layouts that give your app a consistent design across multiple devices.

Skeleton

Skeleton is famous for its "simple support for responsive templates". Because the framework only has about 400 lines of code, it is more suitable for smaller projects or where developers have lightweight requirements.

This is also a good choice for those who are just getting started with front-end frameworks. But because Skeleton lacks CSS design templates, preprocessors, and more rich features, this makes it less suitable for larger teams and projects.

ZURB Foundation

If what you are looking for is a fast and responsive front-end framework, then ZURB Foundation may be just what you are looking for . It allows you to create production-enabled code and prototypes for all devices. Relying on ZURB Foundation to support a framework structure with a "barebones structure" allows users to quickly complete product design prototypes. At the same time, it also has a lot of support on GitHub, with more than 14,000 submissions and more than 940 contributors. Websites such as The Washington Post and National Geographic currently use the ZURB Foundation framework.

UI Kit

UI Kit is known for having lightweight elements that are highly customizable. Based on using the templates it provides, you will be able to easily create various web interfaces. Its installation package includes CSS, HTML and JavaScript files, as well as packages for Sublime Text and Atom editors. Plus, it offers more than 30 modular components that can be mixed and matched for even more functionality. This means you don't have to repeatedly search for tags and class names.

UI Kit differs from other frameworks such as Bootstrap and Foundation in that it does not use a grid setup that divides the page into 12 columns. It divides its layout into three components, namely Flex, Grid and With. However, since there are not many related support resources, this framework is more suitable for developers with considerable experience.

Bulma

As one of the most commonly used frameworks, Bulma has been supported by more than 150,000 developers. It is one of the free and open source frameworks based on Flexbox. Bulma is easy to use, even as a beginner, as the framework keeps only the minimum requirements for developers to develop responsive websites. Meanwhile, in terms of support, Bulma has a large user community on GitHub that provides support.

Materialize

This front-end CSS framework is created according to Google’s design specifications. It comes with an easy-to-use IZ column grid and has a good foundation in layout. Its package also includes buttons, cards, tables, icons and many other ready-to-use common components.

You can also use features such as drag-out mobile menus, ripple animation effects, SASS mixins, etc. In addition, Materialize can be used on any type of device.

Semantic UI

Although Semantic UI is one of the newer frameworks, its efforts in several aspects are still worthy of recognition. . First, it uses natural language in the code, which may be favored by novice developers. And it has an advanced theme variable in its inheritance system, so this gives you a high degree of freedom when designing.

When using Semantic UI, you don't have to use other libraries because it comes with a large number of third-party libraries. This makes your web development process more convenient. With its outstanding features, it may easily capture both new and experienced developers.

Tailwind CSS

Tailwind CSS is different from other CSS frameworks because it does not have any preset UI components in the package. This framework focuses more on practicality. The CSS classes it comes with can help you tremendously when you need to set things like color, size, position, etc. when building a website. Tailwind is designed for developers who want complete freedom in web design.

Picnic CSS

The framework is very lightweight and the compressed code size is less than 10KB. Picnic CSS also provides a Flexbox-based grid layout and many UI elements. It also includes beginner-friendly modal windows and navigation bars that you can use to start your web development project.

Ionic

This open source mobile UI framework can be used to develop high network performance applications for native Android and iOS. It comes with intuitive UI components that help speed up the website or app development process.

Ionic delivers superior native functionality and speed and works well with community, primary analytics, authentication, plugins, and other feature integrations.

Pure.css

Pure.css focuses on the mobile-first philosophy. Since Pure.css is modular, you can easily import the packages you want to use. You also have access to a large number of layouts available for download and installation. Pure.css is known for its lightweight. After compression, the size of this framework is only 3.8KB.

mini.css

mini.css is also a framework that can provide complete functions and is lightweight enough. Its compressed size is about At 10KB, although it is a very lightweight framework, it still provides a large number of layout and UI elements. If you want to know how it works, you can find out through its documentation.

Base

If your main job is to lay a solid foundation for all your application and web development projects, then you can try this This modular framework. Base describes itself as a “rock solid” responsive framework. Base is based on Normalize.css and provides basic, customizable styles. If your need is just a simple framework, then it can satisfy you.

Concise CSS

If you need a simple and practical framework, then Concise CSS may be your choice. Its framework is for developers who want to "drop the bloat". As the name suggests, they provide developers with a package that does not include other extra add-ons. If you need more UI elements, you can add them through a separate tool package.

Mobi.css

At only 2.6KB minified, Mobi.css is one of the smallest frameworks you can find. Its execution speed is its specialty, especially for mobile devices, so if speed is what you're after, give this framework a try.

However, like other modular frameworks, you can build on top of them in a modular way if you need more than the basic styling and functionality they provide.

Summary

In addition to providing users with the foundation required for the normal operation of the project, various CSS frameworks also ensure that your application Consistent access across browsers and includes responsive website design. This allows you to focus better on your application's content and strategy. Well, hopefully you’ll find a framework that fits your needs from the list above.

Recommended tutorial: "CSS Tutorial"

The above is the detailed content of How to use CSS framework reasonably?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:oschina.net. If there is any infringement, please contact admin@php.cn delete