Skip to content

Instantly share code, notes, and snippets.

@yonitru
Created November 27, 2016 09:47
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 yonitru/c8478189ab8eb6d51d413496d7a2efc0 to your computer and use it in GitHub Desktop.
Save yonitru/c8478189ab8eb6d51d413496d7a2efc0 to your computer and use it in GitHub Desktop.
flexbox1
<!DOCTYPE html>
<html>
<head>
<title>flexbox</title>
<link rel="stylesheet" href="includes/style.css">
<style type="text/css">
* {
padding:0px;
margin:0px;
}
header,nav,aside,article,section,footer, main {
display:block;
}
.flex {
display:flex;
flex-direction:row;
width: 350px;
height: 300px;
}
.flex > div {
flex: auto;
width: 30px;
transition: width 0.6s ease-out;
}
.flex > div:nth-child(1){ background: #00b33c; }
.flex > div:nth-child(2){ background: #004d1a; }
.flex > div:nth-child(3){ background: #ff0055; }
.flex > div:hover {
width: 180px;
}</style>
</head>
<body>
<div class="flex">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>flexbox</title>
<link rel="stylesheet" href="includes/style.css">
<style type="text/css">
* {
padding:0px;
margin:0px;
}
header,nav,aside,article,section,footer, main {
display:block;
}
.flex {
display:flex;
flex-direction:row;
width: 350px;
height: 300px;
}
.flex > div {
flex: auto;
width: 30px;
transition: width 0.6s ease-out;
}
.flex > div:nth-child(1){ background: #00b33c; }
.flex > div:nth-child(2){ background: #004d1a; }
.flex > div:nth-child(3){ background: #ff0055; }
.flex > div:hover {
width: 180px;
}</style>
</head>
<body>
<div class="flex">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment