0

I am trying to draw a triangle in css which contain only borders. no background colors.

.arrow {
border-bottom: 10px solid transparent;
border-top: 10px solid transparent;
border-right: 20px solid #000;
height: 0;
width: 0px;
}

The above code gives me a triangle with #000 as background colors. i just want the triangle borders.

5

1 Answer 1

1
.arrow:after {
 content: '\25c1';
 display: inline-block;
}
Sign up to request clarification or add additional context in comments.

2 Comments

will this have support across all browser?
It's not going to work on lynx or anything, but generated content works great on most browsers - caniuse.com/#feat=css-gencontent

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.