简体   繁体   English

在jQuery中简单地定位li元素

[英]Position li elements in jQuery simplyScroll

I can't seem to work out how to position the elements so that they are different distances from the left. 我似乎无法解决如何定位元素,使它们与左侧的距离不同。

Its been a while since I used jQuery and I cannot seem to find an answer. 自从我使用jQuery以来已经有一段时间了,我似乎找不到答案。

Here is what I currently have 是我目前拥有的

Using margin and padding does not move the elements. 使用边距和填充不会移动元素。

Note: currently I am working on the IE 8 or below version of the CSS the main css does not contain all the classes and IDs 注意:目前,我正在使用IE 8或更低版本的CSS,主要的CSS并不包含所有的类和ID。

The padding must use it in the CSS: 填充必须在CSS中使用:

.feedback {
    padding: 10 px;
} 

You also need to include display: inline-block; 您还需要包括display:inline-block; for the ul and/or the li elements depending on what you are trying to achieve. ul和/或li元素取决于您要实现的目标。

Just needed to add position relative then I could use the padding! 只需添加相对位置即可使用填充!

The simple things are the worst! 简单的事情是最糟糕的!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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