HTML CSS examples for CSS Widget:Nav Bar
Create a mobile navigation toggle using pure CSS
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div {<!-- ww w . j a v a2s. c o m--> background-color:Chartreuse; width:100px; height:100px; cursor:pointer; left:-51px; position:relative; } div:focus { background-color:yellow; left:0; transition:left 0.3s ease-in; } div:focus span { color:blue; background-color:pink; } </style> </head> <body> <div class="one" tabindex="1"> <span>Lor</span> </div> <div class="two" tabindex="2"> <span>Lor</span> </div> <div class="three" tabindex="3"> <span>Lorem</span> </div> </body> </html>