You can increase the browser support of your CSS using fallback values and vendor prefixes. This lesson covers using vendor prefixes and fallback values (single prop multiple values) with TypeStyle. It also shows best practices for maintaining variables in the presence of vendor prefixing.

import { style, cssRaw, types } from "typestyle";
import * as React from "react";
import * as ReactDOM from "react-dom"; cssRaw(`
body {
font-size: 1.5em;
font-weight: bold;
color: gold
}
`); const scroll: types.NestedCSSProperties = {
"-webkit-overflow-scrolling": "touch",
overflow: "auto"
}; const bg = style(scroll, {
backgroundColor: [
/* The fallback */
"rgb(200, 54, 54)",
/** Graceful upgrade */
"rgba(200, 54, 54, 0.5)"
]
}); const App = () =>
<div className={bg}>
Hello World!
</div>; ReactDOM.render(<App />, document.getElementById("root"));

最新文章

  1. nfs文件系统挂载错误及解决方法
  2. 动态添加input标签
  3. ASP.NET MVC下的四种验证编程方式【转】
  4. java mail使用中遇到的550类型错误
  5. 【转】iOS 9自带苹果式省电模式 依然软硬兼施
  6. 25、Javascript 事件
  7. php or || 和 and &amp;&amp;
  8. 一则简单演示样例看Oracle的“无私”健壮性
  9. android设备的vpn功能
  10. ios 贝塞尔画图
  11. 微信分享大图遇到的问题(Android)
  12. Web技术的发展 网络发展简介(三)
  13. django请求生命周期,FBV和CBV,ORM拾遗,Git
  14. centos上发布部署python的tornado网站项目完整流程
  15. mr统计每年中每月温度的前三名
  16. Git从远程仓库里拉取一条本地不存在的分支方法
  17. 提升HTML5的性能体验系列之三 流畅下拉刷新和上拉
  18. Linux下安装Python3.6和第三方库
  19. linux服务器查看IO
  20. [Objective-C语言教程]继承(25)

热门文章

  1. 今日题解------codeforce 893d
  2. SpringMVC框架中的异常解析器-ExceptionHandler和HandlerExceptionResolver
  3. inode与ln命令
  4. ip地址个数的计算
  5. 33.Node.js 文件系统fs
  6. Exchanging Partitions and Subpartitions with Tables--官方文档
  7. Code froces 831 A. Unimodal Array
  8. Codeforces Round #194 (Div. 2) 部分题解
  9. 读书笔记-Java设计模式
  10. mySQL函数根据经纬度计算两点距离 复制代码