HTML CSS examples for CSS Widget:Menu
CSS menu with rounded image background
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body {<!--from www . jav a 2 s . co m--> background:Chartreuse; font:13px/21px arial; } ul { margin:21px 0 0 21px; } li { float:left; margin-right:21px; } li a { display:block; color:yellow; height:41px; line-height:36px; font-weight:bold; text-decoration:none; padding:0 21px; } li a:hover { background:url('https://www.java2s.com/style/demo/Google-Chrome.png') no-repeat left top; } li a.current { background:url('https://www.java2s.com/style/demo/Google-Chrome.png') no-repeat left top; } li a.current:hover { background:url('https://www.java2s.com/style/demo/Google-Chrome.png') no-repeat left bottom; } ul { float:left; background:url('https://www.java2s.com/style/demo/Google-Chrome.png'); } #about-li { background:blue url('https://www.java2s.com/style/demo/Google-Chrome.png') right top; margin:0; } #about-li a:hover { background:pink url('https://www.java2s.com/style/demo/Google-Chrome.png') right bottom; margin:0; } </style> </head> <body> <ul> <li> <a class="current" href="">Lore</a> </li> <li> <a href="">Lor</a> </li> <li id="about-li"> <a href="">Lorem</a> </li> </ul> </body> </html>