forms - 如何在 Bootswatch 中的多选选项中左右对齐文本
问题描述
我正在使用 Bootswatch 砂岩https://bootswatch.com/sandstone/
我有一个带有源代码的表格:
<div class="form-group">
<label for="exampleSelect2">Example multiple select</label>
<select multiple="" class="form-control" id="exampleSelect2">
<option><p class="text-left">Subject 1<p><p class="text-right">500 views</p></option>
<option><p class="text-left">Subject 2<p><p class="text-right">400 views</p></option>
</select>
</div>
如何在选项中左右对齐文本值?
解决方案
据我所知,选项标签中不可能有不同的格式。您可以使用的一个选项是使用 title 属性将信息显示为工具提示,如下所示:
<div class="form-group">
<label for="exampleSelect2">Example multiple select</label>
<select multiple="" class ="form-control" id="exampleSelect2">
<option title="500 views">Subject 1</option>
<option title="400 views">Subject 2</option>
</select>
</div>
推荐阅读
- sql - Postgres Group by like 模糊逻辑
- sql-server - TSQL XQuery 过滤器仅选择包含至少一个字符(或非数字)的节点
- firebase - 托管在firebase中的React路由器应用程序,子路由返回404
- c# - 如何通过自定义子字符串相等性仅迭代不同的字符串值
- java - java 9999-12-31 iso 日期插入 mongo 结果作为非 iso 日期插入
- google-maps - 使用 google API 来判断一个地方有多忙
- webpack - 如何使用 Webpack 插件完全删除依赖项及其引用
- postgresql - Greenplum 中的 TB 级数据库
- android - 使用 ionic cordova 开发指纹并在 android 上运行时出现 KeyguardManager 系统服务错误
- java - 作为应用程序要求,我试图从 ftl(模板与 html 相同)获取 pdf,但由于异常而失败