CSS Expressions

后端 未结 3 497
孤街浪徒
孤街浪徒 2020-11-27 17:44

I read somewhere that CSS Expressions were deprecated and shouldn\'t even be used. I had never heard of them and decided to take a look. I found a code example that kept a

3条回答
  •  一个人的身影
    2020-11-27 18:16

    1. Probably not. It's easier to use position:fixed or Javascript
    2. Not unless you're only supporting IE < 8. IE8+ and other browsers don't support it*; it's not standards compliant and won't pass validation
    3. Use position:fixed; bottom:x; top:y; left: a; right:b; where x, y, a, and b are offsets. Or, use Javascript
    4. Again, not unless you're using old versions of IE only. Really, just dump it. the same effects can be achieved with JS and normal CSS.

    *Officially, anyways. Apparently it worked on Chrome for @DalexL

提交回复
热议问题