Allow specific tag to override overflow:hidden

前端 未结 11 2374
抹茶落季
抹茶落季 2020-11-27 11:47

I\'ve got a

, that\'s a certain height and width, and overflow:hidden so that specfic inner images are clipped
11条回答
  •  广开言路
    2020-11-27 12:35

    I know this is an old post, but this can be done (at least in Chrome). I figured this out about two years ago and it's saved me a couple times.

    Set the child to have position of fixed and use margins instead of top and left to position it.

    #wrapper {
        width: 5px;
        height: 5px;
        border: 1px solid #000;
        overflow: hidden;
    }
    
    #parent {
        position: relative;
    }
    
    button {
        position: fixed;
        margin: 10px 0px 0px 30px;
    }
    

    Here is an example: http://jsfiddle.net/senica/Cupmb/

提交回复
热议问题