网站体验步骤,广告设计公司介绍文案,dede 百度网站地图,php网站建设有关知识注释很详细#xff0c;直接上代码 上一篇 新增内容#xff1a; 1.type 属性指定表单类型 2.placeholder 属性指定输入框为空时的占位文字 源码#xff1a; form.wxml
!-- 提前准备好的布局结构代码 --
view classregisterview class… 注释很详细直接上代码 上一篇 新增内容 1.type 属性指定表单类型 2.placeholder 属性指定输入框为空时的占位文字 源码 form.wxml
!-- 提前准备好的布局结构代码 --
view classregisterview classlegend信息登记:/view!-- type里的类型决定手机弹出的输入法键盘的类型--view classform-fieldlabel 姓名:/labelview classfieldinput typenickname value代码对我眨眼睛//view/viewview classform-fieldlabel年龄:/labelview classfieldinput typenumber value21//view/view!-- password密码形式 --view classform-fieldlabel密码:/labelview classfieldinput typetext passwordtrue value123456 val//view/viewview classform-fieldlabel身份证号:/labelview classfield!-- 设置为空时的占位文字 --input typeidcard value31415926535 placeholder不可为空//view/view
/viewform.wxss
/* 页面整体样式 */
page {padding: 40rpx 30rpx; /* 设置页面上下padding和左右padding*/box-sizing: border-box; /* 设置盒模型 */background-color: #f7f8fa; /* 设置背景颜色为*/}/* 标题样式 */.legend {padding-left: 40rpx; /* 设置左内边距 */font-size: 36rpx; /* 设置字体大小 */color: #333; /* 设置字体颜色 */font-weight: 500; /* 设置字体粗细 */}/* 表单字段样式 */.form-field {display: flex; /* 设置为弹性布局 */margin-top: 20rpx; /* 设置上外边距*/padding: 0rpx 40rpx; height: 88rpx; /* 设置高度 */background-color: #fff; /* 设置背景颜色 */line-height: 88rpx; /* 设置行高 */color: #333; }/* 表单字段标签样式 */.form-field label {width: 160rpx; /* 设置宽度 */}/* 表单字段输入框样式 */.form-field .field {flex: 1; /* 设置弹性元素占据剩余空间 */}/* 输入框样式 */.form-field input {height: 100%; /* 设置高度为父元素高度的 100% */}效果演示 1.不同的type属性所决定的输入法键盘 密码类型因为会屏蔽投屏软件所以屏幕会黑在实际手机里面显示的是常见的密码输入键盘 2.输入框为空时的占位文字 下一篇