Darken image on rollover

孤街醉人 提交于 2019-11-29 12:05:09

How is this:

JSFiddle

What I changed:

<ul> and <li> to <div>. Added kitchy class to all menu items,

Changed this CSS:

#topnav {
    float:left;
    margin:22px 0 0 50px;
    list-style:none;
}
.kitchy {
    background: #000;
    width:112px;
    height:103px;
    float:left;
    margin:5px; /*Optional*/
}

#topnav  a:hover{
    opacity:.5;
}
quarkdown27

This might be what you're looking for : How to darken an image on mouseover?

Dont set the width, height, for the li, and don't set it to inline, instead use float: left.

See: http://jsfiddle.net/x9M2N/1/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!