Rotate

    v1.2.0+

    Utilities for rotating elements with transform.

    Rotate an element by first enabling transforms with the utility, then specifying the rotation angle using the rotate-{angle} utilities.

    Note that because Tailwind implements transforms using CSS custom properties, the transform utilities are not supported in older browsers like IE11. If you need transforms for your project and need to support older browsers, or other custom CSS.

    To control the rotation of an element at a specific breakpoint, add a {screen}: prefix to any existing rotate utility. For example, use md:rotate-90 to apply the utility at only medium screen sizes and above.

    For more information about Tailwind’s responsive design features, check out the Responsive Design documentation.

    all

    Rotate - 图3

    sm

    md

    Rotate - 图5

    lg

    xl

    By default Tailwind provides seven general purpose rotate utilities. You change, add, or remove these by editing the theme.rotate section of your Tailwind config.

    Learn more about customizing the default theme in the .

    By default, only responsive, hover and focus variants are generated for rotate utilities.

    You can control which variants are generated for the rotate utilities by modifying the rotate property in the variants section of your file.

    For example, this config will also generate active and group-hover variants:


    ← Scale