jquery - li 元素旁边出现一个框

标签 jquery css

我有一个盒子:

#box1 { 
            height:100px;
            width:208px;  
            } 

和一个列表

<li id="first"><strong>FIRST</strong>
</li>

<li id="second"><strong>SECOND</strong>
</li>

<li id="third"><strong>THIRD</strong>
</li>

<li id="fourth"><strong>FOURTH</strong>
</li>

使用 jquery,当我点击一个 li 元素时,我可以使该框出现...但我希望该框显示在该元素的旁边,而不是 li 的正下方...我只想出现在它旁边...

最佳答案

你能在 ul 元素上尝试 display:inline-block; 吗?只是一个疯狂的猜测。需要更多详细信息。

关于jquery - li 元素旁边出现一个框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3641949/

相关文章:

jQuery - Validate() 并对相似的表单项进行分组

javascript - 如果 div 位于数组内部,如何使用 JQuery 追加

css - Bootstrap css 文件覆盖我的 css 文件

html - 使用 <h :outputStylesheet> makes <p:outputLabel> component invisible

javascript - jQuery - ng-view 不运行 JavaScript,除非脚本位于渲染的 html 中

javascript - Kendo UI Grid 仅在 IE8 和 IE9 中不显示任何数据

jquery - 如何使用 jQuery 获取单选按钮的值?

jquery - 内联列表菜单无法正常工作

css - 在 :hover to affect selector and its :after part 上

html - 防止在 html5 应用程序中剪切复制粘贴