CSS 和 CSS3 的区别

原文:https://www . geeksforgeeks . org/区别-CSS-和-css3/

CSS: CSS 代表层叠样式表。它的主要目标是为网页提供样式和时尚。CSS 提供颜色、布局、背景、字体和边框属性。CSS 特性允许更好的内容可访问性、增强的灵活性和控制,以及表示特征的规范。

CSS3: CSS3 代表级联样式表三级,是 CSS 的高级版本。它用于网页的结构化、样式化和格式化。CSS3 增加了几个新特性,所有现代网络浏览器都支持它。CSS3 最重要的特性是将 CSS 标准拆分成单独的模块,更易于学习和使用。

CSS 与 CSS3 的区别:

| s。没有。 | 半铸钢ˌ钢性铸铁(Cast Semi-Steel) | CSS3 | | one | CSS can locate text and objects. CSS is backward compatible with CSS3 to some extent. | On the other hand, CSS3 can make web pages more attractive and take less time to create. If you write CSS3 code with CSS, it will be invalid. | | Two | CSS does not support responsive design. | CSS3 is the latest version, so it supports responsive design. | | three | CSS cannot be split into modules. | On the contrary, CSS3 can be decomposed into modules. | | four | With CSS, we can't build 3D animation and transformation. | But in CSS3, we can perform all kinds of animation and transformation, because it supports animation and 3D transformation. | | five | 与 CSS3 | In contrast, CSS is very slow, whereas CSS3 is faster than CSS. | | six | We have many unique color patterns and standard colors in CSS. | However, CSS3 has a good collection of HSL RGBA, HSLA and gradient colors. | | seven | We can only use a single text block in CSS. | But we can use multi-column text blocks in CSS3. | | eight | CSS does not support media query. | But CSS3 supports media query. | | nine | CSS code is not supported by all types of modern browsers. | As the latest version, CSS3 code is supported by all modern browsers. | | Ten | In CSS, designers must manually develop fillet gradients and fillets. | However, CSS3 provides the code for setting fillet gradient and fillet. | | 11 | There are no special effects such as shadow text and text animation. In CSS. Animation is written with jQuery and JavaScript. | CSS3 has many advanced functions, such as text shadow, visual effects, and a wide variety of font styles and colors. | | Twelve | In CSS, users can add background colors to list items and lists, set images for list items, and so on. | However, a special *display* attribute is defined in the CSS3 list. Even list items have counter reset properties. |

CSS3 新功能:

  1. 组合符: CSS3 有一个新的通用同级组合符,它通过波浪号(~)组合符与同级元素匹配。

  2. CSS 选择器:与 CSS 提供的简单选择器相比,CSS3 选择器要高级得多,被称为一系列易于使用和简单的选择器。

  3. 伪元素:在 CSS3 中加入了大量新的伪元素,给人以轻松的深度造型。甚至还增加了双冒号的新约定。

  4. 边框样式:最新的 CSS3 也有新的边框样式特性,如边框半径、图像切片、图像源、以及“宽度拉伸”值等。

  5. 背景风格属性:新功能如背景-剪辑、大小、风格、原点属性已添加到 CSS3。