Browser vendors needed a way to add support for new features that were not yet standardized, but without messing up later changes or creating incompatibles. To solve this issue Vendor Prefixes were created. A vendor prefixes is a special prefix added to a CSS property. Each rendering engine has it's own prefix which will only apply the property to that particular browser.

The major browsers use the following prefixes:

  • -webkit- (Chrome, Safari, newer versions of Opera, almost all iOS browsers (including Firefox for iOS); basically, any WebKit based browser)
  • -moz- (Firefox)
  • -o- (Old, pre-WebKit, versions of Opera)
  • -ms- (Internet Explorer and Microsoft Edge)

So, for exmaple, a Firefox prefix for the transform property will be written as -

.example {
-moz-transform: value;
 -moz-border-radius: 10px;
 -webkit-border-radius: 10px;
-o-border-radius: 10px;
 border-radius: 10px;
}

Autoprefixer

  Working with Autoprefixer is simple: just forget about vendor prefixes and write normal CSS according to the latest W3C specs. You don’t need a special language (like Sass) or remember where you must use mixins.

Autoprefixer supports selectors (like :fullscreen and ::selection), unit function (calc()), at‑rules (@supports and @keyframes) and properties.

Because Autoprefixer is a postprocessor for CSS, you can also use it with preprocessors such as Sass, Stylus or LESS.

https://github.com/sindresorhus/sublime-autoprefixer

https://www.w3.org/TR/CSS/#css

CSS3 Vendor-prefixing的更多相关文章

  1. react rem

    1 :安装 postcss-px2rem 2 在webpack.config.js 中添加  引入 const px2rem = require('postcss-px2rem');   找到: lo ...

  2. 采用React+Ant Design组件化开发前端界面(一)

    react-start 基础知识 1.使用脚手架创建项目并启动 ​ 1.1 安装脚手架: npm install -g create-react-app ​ 1.2 使用脚手架创建项目: create ...

  3. [TypeStyle] Use fallback values in TypeStyle for better browser support

    You can increase the browser support of your CSS using fallback values and vendor prefixes. This les ...

  4. 使用react+redux+react-redux+react-router+axios+scss技术栈从0到1开发一个applist应用

    先看效果图 github地址 github仓库 在线访问 初始化项目 #创建项目 create-react-app applist #如果没有安装create-react-app的话,先安装 npm ...

  5. React 如何适用less

    1.使用 create-react-app 创建的项目,默认情况下是看不到 webpack 相关的配置文件,我们需要给它暴露出来,使用下面命令即可: npm run eject 2.添加less np ...

  6. React项目 - 几种CSS实践

    前言团队在使用react时,不断探索,使用了很多不同的css实现方式,此篇blog总结了,react项目中常见的几种css解决方案:inline-style/radium/style-componen ...

  7. 跟我一起使用create-react-app脚手架搭建vw-layout解决方案

    之前也是看过大漠的vw适配Vue-cli,我自己写H5,还有使用vue做项目的时候,会搭建大漠博客中的那一套. 现在在github上面,看见了一位博主使用create-react-app也是用vw适配 ...

  8. React官方脚手架不支持less问题解决

    create-react-app是由React官方提供,并推荐构建React单页应用程序的最佳方法,但是默认不支持less,需要手动集成: 1,必须手动安装less npm install less ...

  9. 三、create-react-app新旧版中使用less和antd并修改主题颜色

    引入less 如果项目根目录中没有config文件夹,首先暴露出项目配置文件,项目下执行: npm run eject 如果项目是从git仓库中pull下来的的话,必须确保本地项目与仓库中没有冲突,才 ...

  10. react中关于create-react-app2里css相关配置

    先看 webpack.config.dev.js 里的相关代码: // style files regexes const cssRegex = /\.css$/; const cssModuleRe ...

随机推荐

  1. java版数据结构与算法第二章数组

    数组由一组具有相同类型的数据元素组成,并存储在一组连续存储单元中.一维数组是常量. 二维数组:若一维数组中的数据元素又是一堆数据结构,我们称之为二维数组.二维数组可以看成是n个列向量组成的线性表. 数 ...

  2. 搭建SSM(Spring+SpringMVC+Mybatis)

    1.SpringMVC和Spring不需要什么特殊配置就可以结合 2.Mybatis和Spring (1)需要引入额外的jar包:mybatis-spring-1.2.2.jar (2)配置数据源 ( ...

  3. github仓库主页介绍、用git管理本地仓库和github仓库、搭建网站

    github仓库主页介绍 名词解释: 工作区: 添加.编辑.修改文件等动作 暂存区: 暂存已经修改的文件,最后统一提交到git中 git(仓库): 最终确定的文件保存到仓库,成为一个新的版本,并且对他 ...

  4. vue--http请求的封装--token

    export const FetchHandler = function (url,opt) { let paramStr = ''; let token = ''; for(key in opt){ ...

  5. gulp在项目中的基本使用

    在项目中用gulp做项目的代码的管理,用起来很方便.主要用到了下面一些功能 关于js的处理,包括合并.压缩.加hash. 关于css的处理,编辑scss,合并css,加hash,自动加入前缀 本地开发 ...

  6. webpack根据开发与生产环境配置不同变量--webpack.DefinePlugin

    webpack有一个DefinePlugin接口,可以实现根据开发与生产环境配置不同变量.范例如下: 需求:开发环境请求baseUrl = '':生产环境请求 baseUrl = 'http://lo ...

  7. Learning Structured Representation for Text Classification via Reinforcement Learning 学习笔记

    Representation learning : 表征学习,端到端的学习 pre-specified  预先指定的 demonstrate  论证;证明,证实;显示,展示;演示,说明 attempt ...

  8. webpack使用中遇到的问题

    http://ife.baidu.com/note/detail/id/534 https://blog.csdn.net/hreticent/article/details/80489851

  9. 卷积神经网络 CNN

    卷积神经网络与普通的神经网络十分相似:他们都由神经元构成,这些神经元拥有可学习的权重和偏差.每一个神经元接收一些输入,执行点积运算并以非线性可选择地跟随它.整个网络仍然表征一个单个可微分的分数函数:从 ...

  10. java 注解 知识整理

    一.前言 注解(也称为元数据)为我们在代码中添加信息提供了一种方法,它在 一定程度上将元数据与源代码文件结合在一起.它是从java 5 开始引入的.通过使用注解,我们可以将元数据保存在Java源代码之 ...