微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

jquery-mobile – data-role =“fieldcontain”有什么用?

我刚刚发现带有data-role =“fieldcontain”的div中的文本输入不会扩展到100%,但如果你将文本输入放在fieldcontain之外,它会扩展到最大.这是他们正在修复的错误,但同时……

所以我想知道首先使用data-role =“fieldcontain”有什么用?为什么要把它?我在文档上看到它,我只是把它放在我的html中,但是把它放在什么用途?

谢谢!

解决方法

看起来它是用于分组和显示的字段容器

> http://jquerymobile.com/demos/1.1.1/docs/api/data-attributes.html

Field container
Container with data-role=”fieldcontain” wrapped around label/form element pair

Controlgroup
DIV or FIELDSET container with data-role="controlgroup". Visually integrate multiple button-styled
inputs of a single type (checkBoxes,link-based buttons,radio
buttons,selects) into a group. For grouping form checkBoxes and radio
buttons,the fieldset container is recommended inside a div container
with the data-role="fieldcontain",to improve label styling.

data-mini true | false – Compact sized version for all items in the
controlgroup
data-type horizontal | vertical – For horizontal or vertical item alignment

原文地址:https://www.jb51.cc/jquery/177560.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐