我正在尝试使用来自陨石包的浮动标签- https://atmospherejs.com/meteoric/ionic available @ http://ionicframework.com/docs/components/#forms-floating-labels。但是,一旦我在文本框内单击,浮动标签就不会出现。不知何故,带类输入标签的span标记的不透明度不会将其不透明度从0更改为1。
我已经创建了一个气象台@ http://meteorpad.com/pad/bn38rssH3CLdJbAaY/Ionic%20Floating%20Label,但是,我认为气象台仍然不支持scss,因此,该应用程序并不像预期的那样在气象台服务器上工作。也许,您可以下载它并在本地运行它。请将style.css重命名为style.scss。
P.s.:在气象卫星github页面- https://github.com/meteoric/meteor-ionic/issues/283上也增加了一个问题。
发布于 2015-08-25 22:38:01
气象包确实支持css,但是“浮动标签”功能确实需要一些javascript来添加和删除类名。只需将以下内容添加到带有浮动标签的页面:
$('.item-floating-label>input').on('keyup', function(){
$(this).val() ? $(this).prev().addClass('has-input')
: $(this).prev().removeClass('has-input');
});我之前还将其添加到github页面。
https://stackoverflow.com/questions/32099879
复制相似问题