That doesn't actually work in pretty much any browser, since it allows for history-mining by a malicious site. :visited styling changed a couple of years ago to only honor color changes, thus preventing most ways of exploiting that issue.
I guess you could create the triangle solely with CSS borders, and then style the border-color to be the same color as the background when not :visited
http://dbaron.org/mozilla/visited-privacy is one of the better resources explaining the issue more fully.
I guess you could create the triangle solely with CSS borders, and then style the border-color to be the same color as the background when not :visited