.triangle { position: relative; &:after { position: absolute; top: 50%; transform: translate(0,-50%); right: 0; content: ''; display: block; width: 0; height: 0; background: transparent; border: 10px solid transparent; border-top-color: transparent; border-bottom-color: transparent; border-left-color: transparent; border-right-color: #0f0; } }