HTML CSS examples for CSS Widget:Menu Item
change content of menu item when active
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .menu {<!--from ww w.ja va2s . c o m--> color:Chartreuse; display:inline-block; width:100px; outline:none; } .menu:focus:before { content:"{" } .menu:focus:after { content:"}" } </style> </head> <body> <span class="menu" tabindex="1">Lore</span> <span class="menu" tabindex="2">Lorem ips</span> <span class="menu" tabindex="3">Lorem</span> <span class="menu" tabindex="4">Lorem i</span> </body> </html>