Position absolute behaving like position fixed when adding dynamic HTML via javascript

前端 未结 3 1959
一整个雨季
一整个雨季 2020-12-11 21:18

Here\'s the code example I\'m having problems with:

http://jsfiddle.net/eejpjch3/

I\'m trying to add a dynamic delete button above HTML elements when hoverin

3条回答
  •  天涯浪人
    2020-12-11 21:36

    Why not use relative positioning? Here is your example using some alternative style rules, specifically

    .icon {
        float:right;
        position: relative;
        bottom: 15px;
    }
    
    .upper-controls {
        position: relative;
    }
    

    JSFiddle Link

提交回复
热议问题