Created
April 29, 2013 22:08
-
-
Save gcyrillus/5485194 to your computer and use it in GitHub Desktop.
position:fixed + margin:auto;
This file contains hidden or 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
/* position:fixed + margin:auto; */ | |
html { | |
background: #f06; | |
background:repeating-linear-gradient(45deg, #acf 0,transparent 14px),repeating-linear-gradient(-45deg, #acf 0,#159 14px); | |
height: 100%; | |
background-attachment : fixed; | |
} | |
body {width: 70%;min-width: 700px;min-height:200%;margin:auto;box-shadow:0 0 5px; | |
background:repeating-linear-gradient(0deg, white 0,#eee 1em); text-align: justify;} | |
.fixed {position:fixed;left:0;right:0;top:75%;width:100%;z-index:-1;} | |
.fixed p {width:70%;min-width:700px;margin:auto;position:relative;} | |
.fixed p a {position:absolute; | |
left:100%;width:2em;line-height:2em;text-align:center;background:linear-gradient(135deg, #777 0 ,#eee 1.5em );border-radius:0 1em 1em 0;box-shadow: 2px 0 2px black;} | |
.img {display:inline-block;position:relative;width:30%;margin: 2.5% 0;border:1px solid;} | |
.img img {width:100%;vertical-align:top;margin:0;padding:0;outline:22px solid rgba(0,120,255,0.4);outline-offset:-25px;} | |
.img h2 {position:absolute;margin:0;overflow:hidden;bottom:0;left:0;right:0;background:rgba(0,100,200,0.55);color:white;text-align:center;max-height:0;transition:1s;border-top:solid 1px black;} | |
.img:hover h2 {max-height:100%;transition:0.5s;box-shadow:0 0 15px 3px;} |
This file contains hidden or 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="fixed"><p><a href="#">top</a></p></div> | |
<div class="img"><img src="http://lorempixel.com/200/200/city/1" /><h2>titre</h2></div> | |
<div class="img"><img src="http://lorempixel.com/200/200/city/2" /><h2>titre</h2></div> | |
<div class="img"><img src="http://lorempixel.com/200/200/city/3" /><h2>titre</h2></div> | |
<div class="img"><img src="http://lorempixel.com/200/200/city/4" /><h2>titre</h2></div> | |
<div class="img"><img src="http://lorempixel.com/200/200/city/5" /><h2>titre</h2></div> | |
<div class="img"><img src="http://lorempixel.com/200/200/city/6" /><h2>titre</h2></div> | |
<div class="img"><img src="http://lorempixel.com/200/200/city/7" /><h2>titre</h2></div> |
This file contains hidden or 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 hidden or 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