CSS selector for element being edited (not hover!), only WebKit -
i have elements editable (content-editable, is). each 1 inside regular spans. there way add border span text cursor (insertion point) is? know "mouse" cursor can use ::hover.
<span class=one>alpha</span> <span class=one>beta</span> <span class=one>gamma</span>
for example, if "|" text insertion point, word "one" becomes red border
al|pha beta gamma
no javascript, css.
thank you!
use selector :focus
note: span must content-editable
css
.one:focus{ border: solid 1px red; display: inline-block; }
Comments
Post a Comment