Skip to content

Instantly share code, notes, and snippets.

@achikin
Created February 19, 2017 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achikin/ae13b20d87faca9495f4dbd9e9ad8761 to your computer and use it in GitHub Desktop.
Save achikin/ae13b20d87faca9495f4dbd9e9ad8761 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.flex-div {
display: flex;
background-color: white;
margin-left: 20
px;
}
.flex-row1 {
background-color: red;
width: 100px;
height: 100px;
margin: 2px;
text-align:center;
line-height: 100px;
}
@keyframes move {
from:{left:0px; top:0px}
to: {left:80px;
top:80px;}
}
#moving {
width: 20px;
height: 20px;
background-color: blue;
position: relative;
top: 10px;
left: 10px;
animation: move 2s ease-in-out 0s infinite;
}
#moving-container{
width: 100px;
height: 100px;
background-color: green;
}
<h1>Flexbox</h1>
<div class="flex-div">
<div class="flex-row1">fafa</div>
<div class="flex-row1" style="background-color: blue">fafa</div>
<div class="flex-row1">fafa</div>
</div>
<div class="flex-div"> <div class="flex-row1">fafa</div> <div class="flex-row1" style="background-color: blue">fafa</div> <div class="flex-row1">fafa</div></div>
<div class="flex-div"> <div class="flex-row1">fafa</div> <div class="flex-row1" style="background-color: blue">fafa</div> <div class="flex-row1">fafa</div></div>
<h1>Animation</h1>
<div id="moving-container">
<div id="moving">aaa</div>
</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment