CSS triangles and cross browser compatibility
Don't use transparent in CSS styles for triangle shapes:
.wrong-triangle {
content: "";
width: 0;
height: 0;
border-top: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid black;
border-left: 5px solid transparent;
}
.right-triangle {
content: "";
width: 0;
height: 0;
border-top: 5px solid rgba(255, 255, 255, 0);
border-right: 5px solid rgba(255, 255, 255, 0);
border-bottom: 5px solid black;
border-left: 5px solid rgba(255, 255, 255, 0);
}
FF generate artefacts (borders) when used transparent
.
Written by Alexey Plutalov
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#