/** * A collection of popular layouts and patterns made with CSS (https://csslayout.io) * (c) 2019 - 2021 Nguyen Huu Phuoc */ import * as React from 'react'; import { Helmet } from 'react-helmet'; import './mega-menu.css'; import RelatedPatterns from '../../components/RelatedPatterns'; import Pattern from '../../constants/Pattern'; import DetailsLayout from '../../layouts/DetailsLayout'; import Block from '../../placeholders/Block'; import BrowserFrame from '../../placeholders/BrowserFrame'; import Rectangle from '../../placeholders/Rectangle'; import Triangle from '../../placeholders/Triangle'; const Details: React.FC<{}> = () => { return (
Move the mouse over the second navigation item to see the mega menu.
...
...
...
`} css={` .container { /* Used to position the mega menu */ position: relative; } .container__trigger:hover .container__content { /* Show the mega menu when hovering the trigger item */ display: block; } .container__content { /* Border */ border: 1px solid rgba(0, 0, 0, 0.3); margin-top: -1px; /* Hidden by default */ display: none; /* Absolute position */ left: 0px; position: absolute; top: 100%; /* Take full width */ width: 100%; /* Displayed on top of other elements */ background: #fff; z-index: 9999; } `} >
); }; export default Details;