Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css transition slide up

//Method 1:Using translateY() can make an an element go up(negative values) or down(positive values)
.slides-up{
	transform: translateY(-200px)
}
//Method 2: Using translate(X Y)
.slides-up{
	transform: translate(0 -200px)
}
//Method 3: Using translate3d(X Y Z)
.slides-up{
	transform: translate3d( 0 -200px 0)
}
Comment

css transition slide down

* {
  margin:0;
  padding:0;
  font-family:"Helvetica Neue", Helvetica, Sans-serif;
  word-spacing:-2px;
}

h1 {
  font-size:40px;
  font-weight:bold;
  color:#191919;
  -webkit-font-smoothing: antialiased;
}

h2 {
  font-weight:normal;
  font-size:20px;
  color:#888;
  padding:5px 0;
}

.message {
background:#181818;
color:#FFF;
position: absolute;
top: -250px;
left: 0;
width: 100%;
height: 250px;
padding: 20px;
transition: top 300ms cubic-bezier(0.17, 0.04, 0.03, 0.94);
overflow: hidden;
box-sizing: border-box;
  
}

.message h1 {
  color:#FFF;
}

#toggle {
  position:absolute;
  appearance:none;
  cursor:pointer;
  left:-100%;
  top:-100%;
}

#toggle + label {
  position:absolute;
  cursor:pointer;
  padding:10px;
  background: #26ae90;
width: 100px;
border-radius: 3px;
padding: 8px 10px;
color: #FFF;
line-height:20px;
font-size:12px;
text-align:center;
-webkit-font-smoothing: antialiased;
cursor: pointer;
  margin:20px 50px;
  transition:all 500ms ease;
}
#toggle + label:after {
  content:"Open" 
}

.container {
transition: margin 300ms cubic-bezier(0.17, 0.04, 0.03, 0.94);
  padding:5em 3em;
}

#toggle:checked ~ .message {
  top: 0;
}

#toggle:checked ~ .container {
  margin-top: 250px;
}

#toggle:checked + label {
  background:#dd6149;
}

#toggle:checked + label:after {
  content:"Close"
}

Comment

PREVIOUS NEXT
Code Example
Css :: WSGI: Truncated or oversized response headers received from daemon process 
Css :: how to change a checkbox to be selected 
Css :: To make multiple equal width buttons occupy container width 
Css :: step 20 freecodecamp flexbox 
Css :: css a tag id selector scrolls too far 
Css :: make table cell less wide css 
Css :: placer balise p a la suite 
Css :: selectors in css 
Css :: Inline style 
Css :: how to make background image NOT scroll with the rest of the page. 
Css :: https request 
Css :: how to add google fonts to css in react 
Css :: less set media size 
Css :: object-fit: cover; 
Css :: css assign multiple classes to one element 
Css :: flexbox in css 
Css :: div with specific id css 
Css :: css menu horizontal 
Css :: scss extend from another css file 
Css :: css font weight 
Css :: css template 
Css :: footer 
Css :: switch checkbox 
Css :: * css meaning 
Css :: css how to make 2d animations at once 
Css :: css aplying everything 
Css :: css tutorial point 
Css :: webpack css not loading 
Css :: html percentage css 
Css :: scss @include mq() 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =