English 中文(简体)
Mouse hover就隐藏了<ul><li>tabs的背景形象
原标题:Mouse hover hides background image of <ul> <li> tabs
  • 时间:2011-10-17 13:53:01
  •  标签:
  • html
  • css
问题回答

将这一部分从你手中删除:

a:hover
{
    color: #ffffff;
    background-color: #990000;
}

http://jsfiddle.net/ryZ4j/2/>rel=“nofollow> http://jsfiddle.net/ryZ4j/2/

从我可以收集到的,希望在<代码><li>上有一个背景形象,在<代码><a>中有一个背景形象。 您的代码没有包含<代码><a>标签的任何背景图像。 页: 1 转换在<代码><li>要素上。

这个问题似乎是一个分层的问题。 如果您对载于<代码><a>的标签适用背景说明,则不能再看<代码><li>。 那里的背景形象仍然存在,你可以看到。 我建议修改<代码><li> on :hover,并留下<代码><a> on transparency。 这样,你就能够看到<代码><li>背景形象。

See an example here:

难道这更像你所期待的吗?





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!