我可以在jQuery Animate上使用clipPath吗?

时间:2019-03-19 10:53:19

标签: javascript jquery clip-path

我正在尝试将clipPath与jQuery的animate()方法一起使用,但是它不起作用。这是我的jQuery代码:

$(document).ready(function main() {
  "use strict";

  $(document).click(function(){
    $(".container").animate({
      width: "100px",
      height: "100px",
      lineHeight: "100px",
      fontSize: "16px",
      clipPath: "polygon(0 50%, 50% 0, 100% 50%, 50% 100%)"
    }, 1000);
  });
});

0 个答案:

没有答案