Skip to content

Instantly share code, notes, and snippets.

@SirPepe
Created August 14, 2013 13:00
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 SirPepe/6230825 to your computer and use it in GitHub Desktop.
Save SirPepe/6230825 to your computer and use it in GitHub Desktop.
Vorhang-Effekt (Lösung)
/**
* Vorhang-Effekt (Lösung)
*/
/* Container */
#Box {
position: relative;
background:blue;
color: blue;
text-align: center;
padding: 3em;
font-size: 2em;
}
/* Vorhänge */
#Box div {
background: red;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 50%;
}
#Box div:last-child {
left: 50%;
right: 0;
}
/* Zustände */
#Box:hover {
color: yellow;
}
#Box:hover div:first-child {
right: 100%;
}
#Box:hover div:last-child {
left: 100%;
}
/* Transition-Eigenschaften */
div {
transition-property: color, left, right;
transition-duration: 2s;
}
#Box {
transition-delay: 2500ms;
}
<!-- content to be placed inside <body>…</body> -->
<div id="Box">
<div></div>
Hallo Welt!
<div></div>
</div>
// alert('Hello world!');
{"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