Impossible to add pseudo element to canvases?

invifywrili

New Member
So, I'm currently developing a map editor for a HTML5 game, and while doing so, I wanted to add some pseudo elements to canvases containing thumbnails for building blocks. But after an hour of experimenting and googling without succes, I simply couldn't make the pseudo element appear, I tried applying the css to a div and it appeared, so I guess there is something special going on with the canvas element? Here is a simple example iv'e set up: http://jsfiddle.net/ZsHGE/So, I'm turning to you, the all knowing folks here at stackoverflow, for an answer, is it impossible to add pseudo elements to the canvas element?\[code\]HTML: <!-- No visible pseudo candy :( --><canvas class="gimmeSomePseudoCandy" width="50" height="50"> :( </canvas><!-- pseudo candy appears! :) --><div class="gimmeSomePseudoCandy"></div>CSS: .gimmeSomePseudoCandy:after { content:"Candy"; }\[/code\]
 
Back
Top