📜  CSS 和 Bootstrap 的区别

📅  最后修改于: 2021-08-30 10:42:11             🧑  作者: Mango

层叠样式表 (CSS): CSS 由 Hakon Wium、Bert Bos、万维网于 1996 年 12 月 17 日开发。它是一种用于描述 HTML 元素如何在网页上显示或 HTML 文档布局(如字体、颜色、边距、内边距、高度、宽度、背景图像等。 CSS 代表层叠样式表,这里的层叠指的是我们应用样式程序的部分,样式指的是颜色、边距、表格段落的字体和标题,等。 Sheet 是指网页的外观。在 CSS 中,我们可以通过编辑单个 CSS 文件来更改网页的外观和布局。

共有三种类型的 CSS。

  1. 内联 CSS
  2. 内部 CSS
  3. 外部 CSS

示例:此示例描述了简单 CSS 属性的使用。



  

    

  

    

Geeksforgeeks

    

        A Computer Science          portal for Geeks     

  

输出:

Bootstrap: Bootstrap 是最流行的开源前端框架。它由 Mark Otto、Jacob Thornton 于 2011 年 8 月 19 日开发。Bootstrap 是 CSS 类和 JavaScript函数的集合,用于响应式设计和构建响应式、移动优先的站点和应用程序。它通常在网格系统上工作,在行和列的帮助下创建页面布局,它支持所有浏览器来创建响应式网站。

例子:

 
 
        
 
    Bootstrap Color Example 
      
     
      
     
      
     
        
     
        
     
        
     
 
    
 
    
          

Bootstrap Colors List

          
                  
  • GeeksforGeeks
  •               
  • GeeksforGeeks
  •               
  • GeeksforGeeks
  •               
  • GeeksforGeeks
  •               
  • GeeksforGeeks class
  •               
  • GeeksforGeeks
  •               
  • GeeksforGeeks
  •               
  • GeeksforGeeks
  •               
  • GeeksforGeeks
  •                         
      
          

输出:

CSS 和 Bootstrap 的区别:

Cascading Style Sheet(CSS) Bootstrap
CSS is developed by Hakon Wium Lie, Bert Bos, World Wide Web 17 December 1996. Bootstrap is developed by Mark Otto, Jacob Thornton 19 August 2011.
CSS represent the style and the appearance of content like font, color, margin, padding, etc. Bootstrap is a free and open-source CSS Framework that is used for developing responsive website.
CSS does not have a grid system. Bootstrap is based on-grid system.
It currently working on CSS3 which is the latest version of CSS. Bootstrap currently working on Bootstrap 4 which is the latest version of Bootstrap.
CSS does not provide responsive pages or website. In Bootstrap we can design a responsive website or webpages.
CSS is more complex than Bootstrap because there is no pre-defined class and design. Bootstrap is easy to understand and it has much pre-design class.
In CSS, we have to write code from scratch. In Bootstrap, we can add pre-defined class into the code without writing code.