Created
June 16, 2013 22:00
-
-
Save anonymous/5793599 to your computer and use it in GitHub Desktop.
A triangle.
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
/** | |
* A triangle. | |
*/ | |
html { height: 100% } | |
body{ background-image: linear-gradient(to bottom left, grey, black); | |
text-align: center;} | |
.triangle { | |
background-image: linear-gradient(rgba(0, 0, 0,0.5), rgba(0, 0, 0, 1)) ; | |
color: lightblue; | |
display: inline-block; | |
line-height: 2em; | |
padding: 0 0.5em; | |
border-width: 0.5em; | |
border-style: solid; | |
border-color: lightblue; | |
border-radius: 0.5em; | |
position: relative; | |
} | |
.triangle:before, | |
.triangle:after { | |
content: ""; | |
display: block; | |
border-bottom-color: transparent; | |
border-left-color: transparent; | |
border-right-color: transparent; | |
border-style: solid; | |
overflow: hidden; | |
height: 0; | |
width: 0; | |
position: absolute; | |
left: 50%; | |
bottom: 0; | |
transform: translate(-50%,100%); | |
} | |
.triangle:before { | |
border-top-color: lightblue; | |
border-width: 1em; | |
margin-bottom: -0.495em; | |
} | |
.triangle:after { | |
border-top-color: rgba(0, 0, 0, 1); | |
border-width: 0.75em; | |
} |
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
<!-- content to be placed inside <body>…</body> --> | |
<div class="triangle" contenteditable="true"><strong>Une info bulle</strong><br/>avec un dégradé.<br />La taille est automatique; vous pouvez également édité ce texte!</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":"1","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment