Last active
February 19, 2020 06:59
-
-
Save i2r/209f14da22f3b53a903db20831ee92a0 to your computer and use it in GitHub Desktop.
Sticky Bottom
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
/** | |
* Sticky Bottom | |
*/ | |
html, body { | |
font-family: sans-serif; | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
} | |
html { | |
/*height: 100%;*/ | |
} | |
body { | |
margin: 0; | |
padding: 100px 100px 50%; | |
} | |
.box { | |
background: green; | |
box-sizing: border-box; | |
border: dashed 3px rgba(255,255,255, 0.5); | |
} | |
.inner { | |
position: sticky; | |
right: 0; | |
bottom: 0; | |
color: white; | |
height: 1000px; | |
width: 30%; | |
box-sizing: border-box; | |
background: blue; | |
border: dashed 3px; | |
} | |
.content { | |
height: 3000px; | |
width: 65%; | |
color: #fff; | |
box-sizing: border-box; | |
background: red; | |
border: dashed 3px; | |
} | |
.content, | |
.inner { | |
display: inline-block; | |
padding: 10px; | |
vertical-align: bottom; | |
letter-spacing: 1px; | |
} |
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
<div class="box"> | |
<div class="content">CONTENT<b>COLUMN</b></div> | |
<div class="inner">STICKY<b>BOTTOM</b></div> | |
</div> |
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
// alert('Hello world!'); |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment