I am trying to use html and css to represent simple vector notation on a web page. A vector is simply indicated by an arrow with the right pointer above the letter. Example like image: vector
The problem is that I could use this notation in more than a few dozen different letters or characters, and I do not want to stop everything and make another image every time I need one. I want to introduce this using text, if at all possible.
During the search, I came across some HTML notation (?) For the pretty arrow with the right pointer (→). So, what I would like to do is come up with some css which, for a letter enclosed in a specific span class, inserts this arrow and positions it above the contents of the range.
For example:
<span class="vector">v</span>
will be displayed as the image linked above.
Is this possible with pure css? Do I have to resort to javascript?
thanks
source
share