将下拉菜单的父背景设置为透明,保持儿童不透明 [英] Set dropdown menu parent background to transparent, keep children opaque

查看:155
本文介绍了将下拉菜单的父背景设置为透明,保持儿童不透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://eaglesflight.sites.hubspot.com/conference顶部附近有一个导航菜单,我希望父项目(TRAINING,COMPANY,RESOURCES)具有透明背景,同时保持当前孩子悬浮的不透明度。

There is a navigation menu near the top of http://eaglesflight.sites.hubspot.com/conference for which I would like to have the parent items (TRAINING, COMPANY, RESOURCES) have transparent backgrounds, while maintaining the current opacity of the children on hover.

基本上,我想要能够看到导航的父项背后的背景图像,而不是目前存在的纯色。

Essentially, I want to be able to see the background image behind the parent items of the navigation as opposed to the solid colour that is currently there.

我是一个业余爱好者,任务在工作中做一些网络开发。非常感谢任何帮助。

I'm an amateur, tasked with doing some web development at work. Any help is greatly appreciated.

推荐答案

删除背景:#1d3d6f .nav-menu li 并将其添加到 .hs-menu-children-wrapper

悬停,从中移除背景:#fff .nav-菜单a:hover

for the hover, remove background: #fff from .nav-menu a:hover

如果不设置背景颜色,您将看到元素后面的任何内容。

If you don't set a background-color, you'll see whatever is behind the element.

这篇关于将下拉菜单的父背景设置为透明,保持儿童不透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆