Displaying an element outside overflow hidden container

后端 未结 8 1107
你的背包
你的背包 2020-12-31 06:14

I have a

which is made scrollable by wrapping it in a
of fixed height.

This

has a drop
相关标签:
8条回答
  • 2020-12-31 07:11

    do you want like this,

    FIDDLE

    i have removed the position:relative for .pRelative

    0 讨论(0)
  • 2020-12-31 07:16

    Is it what you are looking for? LINK

    HTML:

    <td class="hover">hh
      <ul>
        <li>0</li>
        <li>1</li>
        <li>2</li>
        <li>3</li>      
      </ul>
    </td>
    

    CSS:

    td.hover {
        text-align: left;
        list-style: none;        
    }
    td.hover ul {
        padding: 0;
        position: absolute;
        top: 28px;
        width: 150px;       
        opacity: 0;
        visibility: hidden;       
    }
    td.hover ul li {
        background: #555;
        display: block;
        color: #fff;
        text-shadow: 0 -1px 0 #000;
    }
    td.hover ul li:hover {
        background: #666;
    }
    td.hover:hover ul {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    0 讨论(0)
提交回复
热议问题