1

私はLESSを使用しており、このコードを書く必要があります

*zoom: expression(
    this.runtimeStyle.zoom="1",
    this.insertBefore(
        document.createElement("div"),
        this.childNodes[0]
    ).className="before",
    this.appendChild(
        document.createElement("div")
    ).className="after"
);

しかし、構文エラーが少なくなります。私たちを手伝ってくれますか?

4

1 に答える 1

2

Less does not support vendor CSS syntax extensions like MS expression. You still can get anything in the output though by escaping not-supported symbols, but in this particular case it will be more simple to move such properties into a separate css file and include it into your main less file with:

@import (inline) "ms-expressions.css"; 

This way Less will just inject its content "as is" w/o trying to parse anything inside.

于 2014-08-24T21:53:17.207 に答える