调查问卷-微信小程序

index.wxml文件中 

<!--index.wxml-->
<view class="custom-navigation">
  <view class="nav-title">调查问卷</view>
</view>
<view class="container">
  <form bindsubmit="submit">
    <view>
      <text>姓名:</text>
      <input name="name" value="张三"/>
    </view>
    <view>
      <text>性别:</text>
      <radio-group name="gender">
        <label><radio value="0" checked/>男</label>
        <label><radio value="1" />女</label>
      </radio-group>
    </view>
    <view>
      <text>专业技能:</text>
      <checkbox-group name="skills">
        <label><checkbox value="html" checked/>HTML</label>
        <label><checkbox value="css" checked/>CSS</label>
        <label><checkbox value="js" checked/>JavaScript</label>
        <label><checkbox value="ps" checked/>Photoshop</label>
      </checkbox-group>
    </view>
    <view>
      <text>您的意见:</text>
      <textarea name="opinion" value="测试"/>
    </view>
    <button form-type="submit">提交</button>
  </form>
</view>

index.wxss文件中

/**index.wxss**/
page {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.custom-navigation {
  background-color: #fff;
  height:120px; /* 根据需要调整高度 */
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

.nav-title {
  color: black;
  font-size: 18px;
}
.scrollarea {
  flex: 1;
  overflow-y: hidden;
}
.container{margin:50rpx}
view{margin-bottom:30rpx}
input{width: 600rpx;margin-top:10rpx;border-bottom:2rpx solid #ccc}
label{display: block;margin: 8rpx}
textarea{width: 600rpx;height: 100rpx;margin-top:10rpx ;border: 2rpx solid #eee}

在index.json中

{
  "navigationBarTitleText": "调查问卷"
}

app.json

{
  "pages": [
    "pages/index/index"
  ],
  "window": {
    "navigationBarTextStyle": "black",
    "navigationStyle": "custom",
    "navigationBarTitleText": "调查问卷"
  },
  "style": "v2",
  "renderer": "skyline",
  "rendererOptions": {
    "skyline": {
      "defaultDisplayBlock": true,
      "defaultContentBox": true,
      "tagNameStyleIsolation": "legacy",
      "disableABTest": true,
      "sdkVersionBegin": "3.0.0",
      "sdkVersionEnd": "15.255.255"
    }
  },
  "componentFramework": "glass-easel",
  "sitemapLocation": "sitemap.json",
  "lazyCodeLoading": "requiredComponents"
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值