微信小程序公共css

该代码定义了小程序的全局样式,包括页面背景色、字体设置等。同时,详细设置了搜索框组件的样式,如容器布局、输入框和按钮的设计,以及清除浮动和对齐方式。搜索框具有背景色、内边距和圆角,并且包含输入文本和搜索按钮的样式规则。

/app.wxss/

/*
  整个小程序的公共样式表
  可以在页面组件的class属性上直接使用app.wxss中声明的样式规则
*/
/* 容器部分 */
page {
  background-color: rgb(240, 240, 240);
  height: 100%;
  font-size: 32rpx;
  font-family: "Hiragino Sans GB", "Helvetica Neue", Helvetica, "Microsoft Yahei", heiti, Arial, sans-serif;
}

/*搜索部分*/
.container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  min-height: 100%;
  overflow-x: hidden;
}

.search-box {
  -webkit-display: flex;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  box-sizing: border-box;
  background-color: rgba(8, 8, 8, .84);
  padding: 0 56rpx;
  position: relative;
}

.bg-image {
  position: absolute;
  z-index: -1;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
}

.search-input {
  background-color: #fff;
  padding-left: 12px;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  border-top-left-radius: 200rpx;
  border-bottom-left-radius: 200rpx;
  height: 65.182rpx;
  max-width: 577.294rpx;
}

.search-btn {
  background-color: #fff;
  -webkit-display: flex;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding-right: 20rpx;
  border-top-right-radius: 200rpx;
  border-bottom-right-radius: 200rpx;
}

.placeholder-style {
  font-size: 26rpx;
  color: #ABACB0;
}

.clearfix:after {
  display: table;
  clear: both;
  content: '';
}

.pull-left {
  float: left;
}

.pull-right {
  float: right;
}

/* 小程序中也存在web端一样的问题*/
image {
  vertical-align: middle;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

浮生片草

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值