我在将工具提示图标与段落对齐时遇到了一些麻烦,这是我的 html 代码
<div class="tool-tipster" title="For example “8am to 5pm” or “Anytime”"></div>
<p class="information-section">Please tell us what hours you are available the following days.</p>
这是我到目前为止的 CSS
.form__primary.form__two-column .tooltipster-icon{
float: right;
}
我基本上希望工具提示图标 (?) 位于“请告诉我们您接下来几天有空的时间”旁边。这是一张图片来解释
最佳答案
我找到了答案
基本上我已经告诉段落和 div 都像这样向左浮动
HTML
<p class="information-section tooltipster-information-section">Please tell us what hours you are available the following days.</p>
<div class="tool-tipster" title="“IE: 2pm-5pm or All Day”"></div>
CSS
.form__primary.form__two-column .tooltipster-information-section {
float: left;
}
.form__primary.form__two-column .tooltipster-icon{
float: left;
}
适用于我所有的浏览器
关于jquery - 将 jquery ui 工具提示图标与文本对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25379416/