当前位置:主页 > 查看内容

css布局两个button在同父标签中左右两侧分布的方法

发布时间:2021-05-06 00:00| 位朋友查看

简介:本文主要介绍了css布局两个button在同父标签中左右两侧分布的方法,分享给大家,具体如下: 效果图 布局代码 view class=grace-footer style=width:100%; slot=gFooter view style=float:right;width:50% button type=primary style=line-height: 85rpx; mar……

本文主要介绍了css布局两个button在同父标签中左右两侧分布的方法,分享给大家,具体如下:

效果图

布局代码

<view class="grace-footer" style="width:100%;" slot="gFooter">
 <view style="float:right;width:50%">
    <button type="primary" style="line-height: 85rpx; margin: 25rpx; "  @click="saveService(scanKay,tableList)">提交</button> 
 </view>
 <view style="float:left;width:50%">
  <button type="warn" style="line-height: 85rpx; margin: 25rpx;"  @click="removeService()">重置</button>
 </view>
   
</view>

style="float:right;width:50%"
就是在父标签容器中的右侧,并且占据50%宽度

style="float:left;width:50%"
就是在父标签容器中的左侧侧,并且占据50%宽度

grace-footer是GraceUI 引入的css代码是 效果是底部导航

.grace-footer{
     position:fixed; 
     z-index:2; left:0; 
     bottom:0; 
     background:#FFFFFF; 
     width:750rpx; 
     overflow:hidden; 
     box-shadow:1px 1px 6px #888;
}

到此这篇关于css布局两个button在同父标签中左右两侧分布的方法的文章就介绍到这了,更多相关css两个button同父标签左右两侧分布内容请搜索脚本之家以前的文章或继续浏览下面的相关文章,希望大家以后多多支持脚本之家!


原文链接:https://m.jb51.net/css/733159.html
本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!

推荐图文

  • 周排行
  • 月排行
  • 总排行

随机推荐