来自 Dart 的过滤器模糊 CSS 属性

Filter blur CSS property from Dart

Dart 滤镜模糊不适用于 Safari,Chrome... 为什么?

<h1>This text will blur in Firefox, not in Webkit</h1>


import 'dart:html';
import 'dart:core';

main() {
  document.querySelector('h1').style.filter = 'blur(5px)';
}

看起来 Dart 没有用 Chrome 中的 -webkit-filter 替换 filter 但它应该。有计划在 Chrome 中支持无前缀的 filterhttps://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/R2gCfHjNgKs) but it's not clear when this will ship. It might be worth creating a bug report in http://github.com/dart-lang/sdk/issues/new 因此会自动为 Chrome 添加前缀。