Which browsers still support CSS expressions

前端 未结 3 888
情话喂你
情话喂你 2021-01-18 11:52

From a blog:

The basic idea with CSS expressions is that you will have calculation and dynamic values for properties in the CSS code, something

相关标签:
3条回答
  • 2021-01-18 12:02

    Firefox has a similar setup, XBL - check out this answer to a very similar question. HTML5 editor Ian Hickson recently stirred things up a little by releasing a new draft of the W3C attempt to standardize XBL (see also the WG response), so we may ultimately see something similar to Microsoft 's expressions as part of the HTML5 family of technologies.

    0 讨论(0)
  • 2021-01-18 12:07

    AFAIK, it was only ever IE6/7 (maybe) 5.

    I never thought they were a good thing. May as well just use JavaScript directly.

    They are in fact implemented in JavaScript, and I'm pretty sure disabling JS disables these expressions.

    The sample you posted...

    width: expression(document.body.clientWidth >  1100)? "1100px" : "auto";
    

    ...is just a ternary operator that says If the width is larger than 1100px, set it 1100px, otherwise set property to auto.

    To finish, no scripting language on the web is more widely supported than JavaScript.

    0 讨论(0)
  • 2021-01-18 12:13

    Expressions are unique to IE and were dropped in 8:

    http://msdn.microsoft.com/en-us/library/cc304082(VS.85).aspx#expressions

    More about expressions:

    http://msdn.microsoft.com/en-us/library/ms537634(v=VS.85).aspx

    0 讨论(0)
提交回复
热议问题