首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基础6交换机标签定位

基础6交换机标签定位
EN

Stack Overflow用户
提问于 2017-07-13 21:35:09
回答 1查看 672关注 0票数 1

我正在使用带有开关样式复选框的Foundation 6,并且希望标签显示在开关的左侧而不是开关的上方。对于如何实现这一点有什么想法吗?

下面是一个codepen,显示了实际运行的以下代码

代码语言:javascript
复制
<div class='grid-x'>
  <div class='cell small-3' id='quadDivLiveClient'>
    <div class='cell small-5'>
      <label>Exclude condition1?</label>
    </div>
    <div class='cell small-4 end'>
      <div class='switch tiny'>
        <input id='quadChk1' class='switch-input' type='checkbox' 
checked></input>
        <label class='switch-paddle' for='quadChk1'>
          <span class='show-for-sr'></span>
          <span class='switch-active' aria-hidden='true'>Yes</span>
          <span class='switch-inactive' aria-hidden='true'>No</span>
      </label>
      </div>
    </div>
  <div class='cell small-5'>
      <label>Exclude condition2?</label>
    </div>
    <div class='cell small-4 end'>
      <div class='switch tiny'>
        <input id='quadChk2' class='switch-input' type='checkbox' 
checked></input>
        <label class='switch-paddle' for='quadChk2'>
          <span class='show-for-sr'></span>
          <span class='switch-active' aria-hidden='true'>Yes</span>
          <span class='switch-inactive' aria-hidden='true'>No</span>
      </label>
      </div>
    </div>
<div class='cell small-5'>
      <label>Exclude condition3?</label>
    </div>
    <div class='cell small-4 end'>
      <div class='switch tiny'>
        <input id='quadChk3' class='switch-input' type='checkbox' 
checked></input>
        <label class='switch-paddle' for='quadChk3'>
          <span class='show-for-sr'></span>
          <span class='switch-active' aria-hidden='true'>Yes</span>
          <span class='switch-inactive' aria-hidden='true'>No</span>
      </label>
      </div>
    </div>
  </div>
</div>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-07-13 21:47:38

像这样的codepen?

https://codepen.io/xanisu/pen/yXZjez

添加此css样式:

代码语言:javascript
复制
.switch-paddle .switch-active, .switch-paddle .switch-inactive{
  position: absolute;
  left: 52px; 
  color: #000;
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45082257

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档