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. 泊爷带你学go -- 经典的继承与接口 简直吊炸天 !

    package main import ( "fmt" ) type TeamBase struct { m_TeamId uint64 m_Rid uint32 m_RoomRu ...

  2. Python 语法2

    文档字符串,这个只能是用于紧跟函数第二行的内容. 输出文档说明的部分,代码格式是 函数名称.(dot)__(双下划线)doc__(双下划线) ///////////////////////////// ...

  3. CSS效果:焦点图片

    HTML: <html lang="en"> <head> <meta charset="UTF-8"> <meta ...

  4. 学习小片段——springboot 错误处理

    一:先看看springboot默认的错误处理机制 springboot默认会判断是否是浏览器(http请求头Accept是否含有 text/html)来选择返回html错误页面或json错误信息 原因 ...

  5. 服务器搭建lamp环境

    使用的例子:服务器版本内核centos 7.04     Xshell连接到您的服务器上,使系统处于最新状态执行以下命令, yum update -y     利用yum命令安装Apache执行命令, ...

  6. 理解JavaScript中的属性描述符

    我们把描述JavaScript中定义内部特性的属性叫做属性描述符 分为两大类:数据描述符和存取描述符 数据描述符是一个拥有可写或不可写的属性(Writable); 存取描述符不包含数据值,是一组拥有g ...

  7. 【软件安装与环境配置】TX2安装配置caffe过程

    Tx2刷机 sudo sh ./caffe_dependency.sh 注意python的版本问题. 问题 LD -o .build_release/lib/libcaffe.so. /usr/bin ...

  8. React生命周期简单详细理解

    前言 学习React,生命周期很重要,我们了解完生命周期的各个组件,对写高性能组件会有很大的帮助. Ract生命周期 React 生命周期分为三种状态 1. 初始化 2.更新 3.销毁 初始化 1.g ...

  9. linux rar文件解压命令

    解压命令: unrar x demo.rar

  10. Spring+Mybatis+SpringMVC+Maven+MySql搭建实例(转)

    http://blog.csdn.net/evankaka/article/details/48785513?spm=5176.100239.blogcont28591.10.9Fdj9R