trantition css code example

Example 1: css trasnalte

/* Single <length-percentage> values */
transform: translate(200px);
transform: translate(50%);

/* Double <length-percentage> values */
transform: translate(100px, 200px);
transform: translate(100px, 50%);
transform: translate(30%, 200px);
transform: translate(30%, 50%);

Example 2: trancate en css

<h1>
  This little piggy went to market and this little piggy stayed home.
</h1>

h1 {
  width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  
  padding: 20px;
  font-size: 1.3rem;
  margin: 0;
  background: white;
  resize: horizontal;
}

body {
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #ccc;
}

Tags:

Css Example