* { margin: 0; padding: 0; } ul { list-style: none; } .navs {width: 100%; height: 40px; line-height: 40px; overflow: hidden; position: relative; } .navs li { padding: 0 11px; text-align: center; line-height: 42px; float: left; cursor: pointer; } .navs li a{ font-size: 15px; color: #222222;} .navs li:hover { color: red; font-weight: bold; } ul { position: relative; } .navs span { position: absolute; top: 0; left: 0; width: 90px; height: 42px; background: url(/static/images/menubg.png) center top no-repeat; }