zoukankan      html  css  js  c++  java
  • 按钮样式

    1、.wxml(按钮的样式不生效,可删除app.json里的

    "style": "v2"



     <button style="80%;" class='btn1' open-type='openSetting'>
        <image style="height: 40rpx;" class='btnImg' src='/image/wechat.png'></image>
        <view>确定</view>
     </button>
    
      <view class="home">
        <button class="btn2" bindtap="home">
          <view>返回主页面</view>
        </button>
      </view>
    2、.wxss

    .btn1 {
       80%;
      margin-top: 20rpx;
      background-color: burlywood;
      color: white;
      border-radius: 98rpx;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
    }
    
    .btnImg {
      margin-right: 8rpx;
       46rpx;
      height: 46rpx;
    }
    
    .btn1::after {
      border-radius: 98rpx;
      border: 0;
      /* border-color: red; */
      /* border和border-color:red只存在一个(border:0是没有边框的,另一个有边框的) */
    }
    
    
    
    .home{
       100%;
      position: fixed;
      bottom: 0;
      height: 140rpx;
      background-color: rgb(255, 255, 255);
      border-top:solid 1px #e1e1e1;
    }
    
    
    
    
    .btn2 {
       85%;
      margin-top: 20rpx;
      background-color: rgb(0, 0, 0);
      color: rgb(255, 255, 255);
      border-radius: 98rpx;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      font-size: 26rpx;
      height: 82rpx;
      font-weight: 500;
      margin-top: 30rpx;
    }

    效果图
  • 相关阅读:
    运算符的方向--好神奇
    a++ 和 ++a ;
    c语言中!和~的区别
    函数的参数,参数为数组
    反射的理解
    ThreadLocal类
    多线程面试题-sleep()和wait()区别
    话题1-关键字
    实现多线程的另一种方式-Callable
    线程池
  • 原文地址:https://www.cnblogs.com/ki16/p/14751183.html
Copyright © 2011-2022 走看看