- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一个列表框容器,每行显示 3 个元素。
第一项是标签复选框,第二项是 Select2 下拉框,第三项是指向弹出窗口的链接。
我的 fiddle Fiddle显示取自列表框的单行。
几个小时后,我设法将 3 个元素组织成一行,但 Select2 下拉框显示的是下拉菜单而不是输入框。
关于如何让保管箱正常工作的任何想法?此外,我非常不确定我为每一行构建编码的方式。很高兴知道是否有更有效/更强大的方法。非常感谢任何帮助。
https://select2.github.io/select2/select2-3.5.1/select2.js
https://select2.github.io/select2/select2-3.5.1/select2.css
<label>
<input type="checkbox" name="checkbox" id="First" />
<span class="LHLabelClass">First row LH label:</span>
</label>
<span class="MiddleLabelClass">
<select id="multipleSelectExample1" class="tester" data-placeholder="Select type" multiple="multiple">
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
<option value="Option 3">Option 3</option>
</select>
</span>
<span class="RHLabelClass">
<a href="#" id="POPUP1" >First RH row label</a>
</span>
$(function() {
$("#multipleSelectExample1").select2({});
});
* {
box-sizing: border-box;
}
.LHLabelClass {
color: blue;
margin-left: 10px;
margin-right: 20px;
margin-bottom: 30px;
width: 150px;
display: inline-block;
border: 1px solid blue;
}
.MiddleLabelClass {
width: 100px;
margin-right: 30px;
display: inline-block;
border: 1px solid brown;
}
.RHLabelClass {
width: 150px;
display: inline-block;
border: 1px solid green;
}
.select2-container-multi .select2-choices {
outline:none;
width: 224px!important;
height: 27px!important;
padding: 0px 0px 0px 0px;
border: 1px solid transparent;
}
.select2-container-multi .select2-choices .select2-search-choice{
outline:none;
font-size: 11px;
background:#CEDDF0;
color: black;
padding: 2px 3px 2px 16px!important;
margin-top: 5px!important;
margin-right: 3px;
margin-left: 4px;
border: 1px solid #605D9C;
}
.select2-drop{
outline:none;
font-size: 12px;
color: black;
}
最佳答案
检查你的 fiddle 的控制台,你在这里缺少 jquery 文件:
$(function() {
$("#multipleSelectExample").select2({});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://select2.github.io/select2/select2-3.5.1/select2.css" rel="stylesheet"/>
<script src="https://select2.github.io/select2/select2-3.5.1/select2.js"></script>
<label>
<input type="checkbox" name="checkbox" id="First" />
<span class="LHLabelClass">First row LH label:</span>
</label>
<span class="MiddleLabelClass">
<select id="multipleSelectExample" class="tester" data-placeholder="Select type" multiple="multiple">
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
<option value="Option 3">Option 3</option>
</select>
</span>
<span class="RHLabelClass">
<a href="#" id="POPUP1" >First RH row label</a>
</span>
关于html - 无法让 select2 保管箱在列表框行中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42504166/
我在理解 Node.js 的 Dropbox JS api 时遇到了一些问题 创建 authDriver 后,如何将我的客户端路由到 Dropbox 访问对话框?假设他们获得我的 Express 应用
我正在尝试使用纯 javascript/html 从跨域下载一些数据,具体来说是 dropbox。 function myCallback(dataWeGotVia
出于某种目的,我创建了单例,通过这个新对象组织所有使用 Dropbox 的作品。 所以我有下一个初始化代码如下的单例: - (id)init { self = [super init];
我是 SVN 的新手,所以请耐心等待我的(可能很奇怪的)问题。 我一直在使用 Tortoise 和 WAMP 在 Windows 7 上使用 SVN 在我的本地机器上进行开发。 由于所有项目都在我的
我正在使用可从 https://github.com/karthikram/rDrop 获得的 rDrop 包,经过一些调整(因为所有功能都不像您一直期望的那样正常工作)我终于按照我想要的方式工作了,
我是一名优秀的程序员,十分优秀!