CSS: Workaround to backdrop-filter?

前端 未结 5 2141
别跟我提以往
别跟我提以往 2020-11-30 19:15

backdrop-filter is a recent CSS feature, that is not yet available in modern browsers (at least as of July 1, 2016).

  • Chrome 51 supports bac
5条回答
  •  日久生厌
    2020-11-30 19:30

    You could try to add different filters to the background images:

    https://css-tricks.com/almanac/properties/f/filter/

    The downfall to this, is that it only works on images.

    Basically, there are 10 built-in filters for the CSS filter property:

    • blur(px)
    • brightness(%)
    • contrast(%)
    • drop-shadow(h-shadow v-shadow blur spread color)
    • grayscale(%)
    • hue-rotate(deg)
    • invert(%)
    • opacity(%)
    • saturate(%)
    • sepia(%)

    And additionally, you can provide it an url, wich contains an XML file with the appropariate filter.

提交回复
热议问题