如何让两条线在一条线上?

时间:2017-01-17 07:28:34

标签: html css wechat

我正在写一个小程序,有一个我不明白的问题:

enter image description here

看看这个,我想要一行中的两行文字,以及"请输入您要查询的文本"右边的“取消”,它们是平行的。

怎么办呢?

我的代码在function validate() {...} // No library is required as this is pure JS code

search.wxml

<view class="search"> <view class="section"> <input placeholder="请输入您要查询的文本" auto-focus/> <navigator class="navigator" url="../../index">取消</navigator> </view> </view>

search.wxss

我的项目导航是图片显示:

enter image description here

我想我应该对.search .section { height: 90rpx; background-color: #eac627; } 大惊小怪,但不知道如何处理。

1 个答案:

答案 0 :(得分:0)

请参阅vivekkupadhyay的usful评论,我使用wxss选择器来获取:

#input-word {
  display:inline-block;
}

#cancel-button {
  display:inline-block;
  width:120rpx;
  float:right;
}

再次感谢!