Yahoo India Web Search

Search results

  1. May 6, 2024 · The translate() CSS function repositions an element in the horizontal and/or vertical directions. Its result is a <transform-function> data type.

  2. The translate() method moves an element from its current position (according to the parameters given for the X-axis and the Y-axis). The following example moves the <div> element 50 pixels to the right, and 100 pixels down from its current position: Example. div { transform: translate (50px, 100px); } Try it Yourself » The rotate () Method.

  3. Learn how to use the CSS transform property to apply 2D or 3D transformations to an element, such as rotate, scale, translate, skew, etc. See examples, syntax, browser support, and related pages.

  4. People also ask

  5. css-tricks.com › almanac › propertiesTransform | CSS-Tricks

    • Skew. /* Skew points along the x-axis */ .element { transform: skewX(25deg); } /* Skew point along the y-axis */ .element { transform: skewY(25deg); } /* Skew points along the x- and y-axis */ .element { transform: skew(25deg, 25deg); }
    • Rotate. .element { transform: rotate(25deg); } This rotates an element clockwise from its original position, whilst a negative value would rotate it in the opposite direction.
    • Translate. .element { transform: translate(20px, 10px); } This transform function moves an element sideways, or up and down. Why not just use top/left/bottom/right?
    • Multiple values. With a space-separated list you can add multiple values to the transform property: .element { width: 20px; height: 20px; transform: scale(20) skew(-20deg); }
  6. css-tricks.com › almanac › propertiesTranslate | CSS-Tricks

    Nov 9, 2021 · Learn how to use the translate property to move an element along the X, Y, and Z axes. See syntax, examples, browser support, and related properties.

  7. Learn how to use the CSS translate property to change the position of elements in 2D or 3D. See examples, syntax, browser support, and related properties.

  8. Jun 23, 2017 · The translate() CSS function repositions an element in the horizontal and/or vertical directions. This transformation is defined by a vector whose coordinates define how much it moves in each axis. Syntax. How to read CSS syntax. translate(tx) or . translate(tx, ty) Values. tx.