Use normalize to reset css style in Vue

1. The advantages of normalize

(1) Normalize.css is just a small css file, but it provides a high degree of cross-browser consistency in the grinding HTML element style. Normalize.css is a modern, HTML5-ready, premium alternative to traditional CSS reset. In conclusion, Normalize.css is an alternative to CSS reset.

(2) Function:

  • Preserve useful browser styles instead of stripping them
  • Provides generalized styles for most HTML elements
  • Fix the browser's own bugs and ensure the consistency of each browser
  • Optimize css usability
  • Code explained with comments and detailed documentation

Normalize supports a large number of browsers including mobile browsers, and at the same time generalizes HTML5 elements, typography, lists, embedded content, forms and cousins. Although the project is based on the principle of generalization, more practical defaults are used where appropriate.

2. Installation

npm install --save normalize.css

3. Introduce in main.ts

import 'normalize.css'

Guess you like

Origin blog.csdn.net/qq_41839808/article/details/123052783