切换开关更改 [英] Toggle Switch change

查看:66
本文介绍了切换开关更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

拨动开关显示控件一侧的开/关。

Toggle switch shows the on/off on one side on the control.

如何显示'开" 在控制权的左侧和控制权的"关闭"。

How can I display 'on'  on left of control and 'off' on right of control.

REgards

-Lalit

推荐答案

你打赌!

加载HTML ToggleSwitch样式样本。

Load the HTML ToggleSwitch style sample.

导航到第二个场景并使用DOM浏览器并单击电源按钮切换。

Navigate to the 2nd scenario and use the DOM explorer and click on the power button toggle.

你会看到有构成此控件的几个HTML元素。 还要注意样式并使用Visual Studio的跟踪样式功能。

You will see there are a couple of HTML elements that make up this control.  Also notice the style and use the trace styles feature of Visual Studio.

您会发现此控件使用-ms-grid来定位元素,因此您需要做的就是引用那个类和构成开关和标签的元素,并翻转-ms-grid-column属性来交换这两个!

You will find that this control uses the -ms-grid to position the elements, so all you need to do is reference that class and the elements that make up the switch and the label, and flip the -ms-grid-column attributes to swap these two!

这样的东西:

.differentLabelStyle.win-toggleswitch .win-label
{
    -ms-grid-column: 2;
}

.differentLabelStyle.win-toggleswitch .win-switch
{
    -ms-grid-column: 1;
}




-Jeff


-Jeff


这篇关于切换开关更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆