How to flip background image using CSS?

后端 未结 5 2143
盖世英雄少女心
盖世英雄少女心 2020-12-04 05:29

How to flip any background image using CSS? Is it possible?

currenty I\'m using this arrow image in a background-image of li in css

5条回答
  •  感动是毒
    2020-12-04 06:00

    You can flip it horizontally with CSS...

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

    jsFiddle.

    If you want to flip vertically instead...

    a:visited {
        -moz-transform: scaleY(-1);
        -o-transform: scaleY(-1);
        -webkit-transform: scaleY(-1);
        transform: scaleY(-1);
        filter: FlipV;
        -ms-filter: "FlipV";
    }
    

    Source.

提交回复
热议问题