Make Foundation 6拨动开关一直移动?

时间:2015-12-31 02:22:18

标签: zurb-foundation

https://jsfiddle.net/L4a8cbqw/的小提琴中有一个拨动开关。当它点击时白框不会一直向右滑动,它会停止一半。这是因为我调整了交换机的大小。无论拨动开关有多宽,如何让白盒一直向右滑动?

<div class="switch large">
        <input class="switch-input" id="largeSwitch" type="checkbox" name="exampleSwitch">
        <label class="switch-paddle" for="largeSwitch" style="width: 7rem !important; font-weight: bold;">
            <span class="show-for-sr">Show Large Elephants</span>
                <span class="switch-active" aria-hidden="true">Off</span>
                <span class="switch-inactive" aria-hidden="true">Show</span>            
        </label>
    </div>

1 个答案:

答案 0 :(得分:0)

这个CSS应该这样做:

.switch.large input:checked ~ .switch-paddle:after {
  left: 4.75rem;
}