Created
September 4, 2015 08:15
-
-
Save anonymous/c9400241f52e59ad4620 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/fawimuxemi
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> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
*{ | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} | |
body { | |
overflow-x: hidden; | |
} | |
.full-width { | |
position: relative; | |
} | |
.full-width::before { | |
content: ""; | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
width: 9600px; | |
left: 100%; | |
background: inherit; | |
} | |
.full-width::after { | |
content: ""; | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
width: 9600px; | |
right: 100%; | |
background: inherit; | |
} | |
.container { | |
background: #eee; | |
max-width: 500px; | |
padding: 0px 10px; | |
margin: 0 auto; | |
} | |
.sec1 , | |
.sec3 { | |
background: #F5EFEF; | |
padding: 10px; | |
margin-bottom: 10px; | |
} | |
.sec2 { | |
background: red; | |
height: 300px; | |
margin-bottom: 10px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="sec1">Item1</div> | |
<div class="sec2 full-width">Item2</div> | |
<div class="sec3">Item3</div> | |
</div> | |
<script id="jsbin-source-css" type="text/css">*{ | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} | |
body { | |
overflow-x: hidden; | |
} | |
.full-width { | |
position: relative; | |
} | |
.full-width::before { | |
content: ""; | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
width: 9600px; | |
left: 100%; | |
background: inherit; | |
} | |
.full-width::after { | |
content: ""; | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
width: 9600px; | |
right: 100%; | |
background: inherit; | |
} | |
.container { | |
background: #eee; | |
max-width: 500px; | |
padding: 0px 10px; | |
margin: 0 auto; | |
} | |
.sec1 , | |
.sec3 { | |
background: #F5EFEF; | |
padding: 10px; | |
margin-bottom: 10px; | |
} | |
.sec2 { | |
background: red; | |
height: 300px; | |
margin-bottom: 10px; | |
} | |
</script> | |
</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
*{ | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} | |
body { | |
overflow-x: hidden; | |
} | |
.full-width { | |
position: relative; | |
} | |
.full-width::before { | |
content: ""; | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
width: 9600px; | |
left: 100%; | |
background: inherit; | |
} | |
.full-width::after { | |
content: ""; | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
width: 9600px; | |
right: 100%; | |
background: inherit; | |
} | |
.container { | |
background: #eee; | |
max-width: 500px; | |
padding: 0px 10px; | |
margin: 0 auto; | |
} | |
.sec1 , | |
.sec3 { | |
background: #F5EFEF; | |
padding: 10px; | |
margin-bottom: 10px; | |
} | |
.sec2 { | |
background: red; | |
height: 300px; | |
margin-bottom: 10px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment