Last active
July 26, 2022 14:35
-
-
Save Quinten/5720298 to your computer and use it in GitHub Desktop.
tooltip triangle on the top of an element in css
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
#element:before { | |
content: ""; | |
position: absolute; | |
width: 0; | |
height: 0; | |
border-left: 16px solid transparent; | |
border-right: 16px solid transparent; | |
border-bottom: 16px solid #fff; | |
top: -15px; | |
left: 27px; | |
z-index: 5; | |
} | |
#element:after { | |
content: ""; | |
display: block; | |
position: absolute; | |
width: 0; | |
height: 0; | |
border-left: 16px solid transparent; | |
border-right: 16px solid transparent; | |
border-bottom: 16px solid #bbb; | |
top: -16px; | |
left: 27px; | |
} |
You are welcome 🙂
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks u saved my day 😄