3 ms·
If you write the annotation like this: <ruby>C<rt class="ruby-1"></rt></ruby> With this CSS: .ruby-1::after { content: "1"; } (with corresponding
by twic 5y ago
If you write the annotation like this:
<ruby>C<rt class="ruby-1"></rt></ruby>
With this CSS:
.ruby-1::after {
content: "1";
}
(with corresponding treatment for other numbers)
Then you should get an annotation that resists copying. This renders correctly for me in Firefox; no idea about other browsers.
- lelandfe 5y agoNice one. A slight change that will result in less CSS: <ruby class="smiles">C<rt data-atom="1"></rt></ruby> With this CSS: .smiles rt::after { content: attr(data-atom); }
- dalke 5y agoThanks twik and leflandfe! Using CSS ::after resolves those highlighting and copy&paste issues I noticed. New jsfiddle at https://jsfiddle.net/hnw1zbed/2/ https://jsfiddle.net/hnw1zbed/2/ .