Cannot set shadow on dropdown menu
See original GitHub issueHow do I set a shadow on the drop-down menu?
<b-dropdown size="sm" variant="primary">
<div class="shadow">...</div>
</b-dropdown>
.shadow{
-webkit-box-shadow: 5px 5px 15px 0px rgba(0,0,0,0.5);
-moz-box-shadow: 5px 5px 15px 0px rgba(0,0,0,0.5);
box-shadow: 5px 5px 15px 0px rgba(0,0,0,0.5);
}
I could do this with plain bootstrap :
<div class="dropdown-menu shadow">...</div>Now the above code sets the shadow on the inner div but not the whole menu. When using F12 I see there is a parent ul
which wraps my div with class dropdown-menu
but setting any shadow css on that class has no effect!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Add shadows in the dropdown menu - css - Stack Overflow
But i cant figure that out. I've added this code: .nav-dropdown { box-shadow: none; }.
Read more >Shadow effect behind drop down menu - Squarespace Forum
Hi! I am trying to create this cool shadow effect that appears behind the nav drop down menu. Currently, it looks like the...
Read more >box-shadow - CSS-Tricks
The box-shadow property in CSS is for putting shadows on elements (sometimes referred to as “drop shadows”, ala Photoshop/Figma).
Read more >3 ways to style CSS box-shadow effects - LogRocket Blog
The box-shadow property allows you add a shadow around an element on a webpage. It can tell us if an element like a...
Read more >Dropdown | Webflow University
Use the built-in Webflow dropdown component to add, style, and set up dropdown menus and links. ... Your browser can't play this video....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can find out more about the limitations (and workarounds) for scoped styles and child components at https://vue-loader.vuejs.org/guide/scoped-css.html#child-component-root-elements
An alternative, if using an existing “shadow” class:
This will add the class (or classes) specified in prop
menu-c;lass
to the rendered.dropdown-menu
<ul>
element.