简体   繁体   中英

Gradient border around popup

Currently I'm working on a HTML implementation of the Office Ribbon to use in Web Apps. Here's a screenshot that shows you:

在此处输入图片说明

You see that I have a DropDown on the ribbon under "New Items". So far so good, but let's compare it against the real Office implementation:

在此处输入图片说明

Here you see that the dropdown menu has a gradient around it that makes makes it's clear that it's laying on top of the interface.

Now I cannot accomplish then so I was hoping someone can given me a solution to this issue.

The HTML for the dropdown element is as following:

<div class="icon bigicon">
    <img src="Resources/Icons/MailNewItemMenu.png" />
    <div class="label">
        New<br/>Items
    </div>
    <div class="menu">
        <div class="menucontents">
            <ul style="list-style: none; padding: 0px;">
                <li style="height: 25px; line-height: 25px; text-align: left;">Create</li>
                <li style="height: 25px; line-height: 25px; text-align: left;">Manage</li>
                <li style="height: 25px; line-height: 25px; text-align: left;">Delete</li>
            </ul>
        </div>
    </div>
</div>

The css is as follows:

#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .icon { text-align: center; display: inline-block; padding-top: 2px; padding-left: 3px; padding-right: 3px; vertical-align: top; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .bigicon { height: 70px; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .smallicon { padding-top: 0px; height: 24px; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .icon:hover { background-color: #cde6f7; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .icon:active { background-color: #92C0E0; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .icon .label { line-height: 16px; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .smallicon { display: inline-block; padding-right: 5px; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .smallicon IMG { vertical-align: middle; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .smallicon .label { display: inline-block; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .icon .menu { position: relative; top: -1px; left: 1px; }
#OfficeUI .ribbon .tabs > ul li[role=tab] .contents .group .icongroup .icon .menu .menucontents { position: relative; z-index: 100; background-color: white; left: -4px; border-top: 1px solid #C6C6C6; border-bottom: 1px solid #C6C6C6; background-image: linear-gradient(#C6C6C6, #C6C6C6), linear-gradient(#C6C6C6, #C6C6C6); background-size:1px 100%;     background-position: 0 0, 100% 0; background-repeat: no-repeat; }

How can i do this ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM