jQuery autocomplete : move list position?

后端 未结 4 1677
梦谈多话
梦谈多话 2021-01-18 04:52

I am wondering if it is possible for me to move the dropdown list down 4px?

I have tried several styles in .ui-autocomplete {}.

including:

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-18 05:52

    Can't say off the top of my head but it depends what the existing css is...

    if the position is absolute then the margin won't effect the box... What you could do is get the resulting div $('.ui-autocomplete') then add 4px to the element's position.

    It will either be:

    $('.ui-autocomplete').css('bottom') or $('.ui-autocomplete').css('top')

    Get the value of both of these and change them around, see what happens :)

提交回复
热议问题