How to rotate + flip element with CSS

后端 未结 4 572
长发绾君心
长发绾君心 2020-12-24 12:29

The transform property lets you rotate or flip, but how can you do both at the same time? Say I want to rotate an element 90 degrees and flip it horizontally? Both are don

4条回答
  •  無奈伤痛
    2020-12-24 12:41

    Have a look at this:

    element {
            -moz-transform: scaleX(-1);
            -o-transform: scaleX(-1);
            -webkit-transform: scaleX(-1);
            transform: scaleX(-1);
            filter: FlipH;
            -ms-filter: "FlipH";
    }
    

    for more info here is the link: https://css-tricks.com/snippets/css/flip-an-image/

提交回复
热议问题