开发者

Dropdown menu & rounded corners

开发者 https://www.devze.com 2023-02-03 13:20 出处:网络
A quick query relating to rounded corners on a dropdown menu. You can see a sample here: http://jsfiddle.net/tomperkins/C5mTf/

A quick query relating to rounded corners on a dropdown menu.

You can see a sample here: http://jsfiddle.net/tomperkins/C5mTf/

The question relates to the 'Help' button on the right hand side. I've specified for the menu items to have square bottom corners when on hover, which is fine.

The trouble is, I can't get the 'Help' button to have rounded corners on the lower corners?

Got me stumpted, any开发者_如何转开发 help really appreciated.

Thanks in advance,

Tom Perkins


Your problem is this selector:

#menu ul:hover #help

This selects any element with id="help" that is a descendant of a ul being hovered. Since the help menu is itself that ul, this doesn't work.

Switching the selector instead to:

#menu ul#help:hover

fixes the problem. See it here: http://jsfiddle.net/C5mTf/1

0

精彩评论

暂无评论...
验证码 换一张
取 消