Created
September 15, 2019 14:22
-
-
Save saiyerniakhil/fe4d1701971187d52efd100917309376 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<link rel="stylesheet" href="style.css"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div class="container" role="main"> | |
<div class="box c1">Box 1</div> | |
<div class="box c2">Box 2</div> | |
<div class="box c3">Box 3</div> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
display: flex; | |
display: -webikit-flex; | |
flex-flow: row wrap; | |
-webkit-flex-flow: row wrap; | |
} | |
.box { | |
border: 1px black solid; | |
} | |
.c1, .c2, .c3 { | |
width: 100%; | |
} | |
@media (min-width: 600px) { | |
.c1 { | |
width: 60%; | |
order: 2; | |
-webkit-order:2; | |
} | |
.c2 { | |
width: 40%; | |
order: 1; | |
-webkit-order: 1; | |
} | |
.c3 { | |
width: 100%; | |
order: 3; | |
-webkit-order:3; | |
} | |
} | |
@media (min-width: 800px) { | |
.c2 { | |
width: 20%; | |
} | |
.c3 { | |
width: 20%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment