欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

微信小程序 首行缩进、 去掉/取消首行缩进

小程序首行缩进

96 
赵羽珩 关注                        
2018.08.03 10:17* 字数 11 阅读 503评论 0喜欢 0                        

首行缩进20rpx .wxss 代码如下:

    #packInfo .couintro text {
        font-size: 28rpx;
        padding: 0 56rpx;     /* 56 / 28 = 2个缩进字 */
  }
                       
    view {
            font-size: 28rpx;
            text-indent: 56rpx;
            text-align: left;
    }
                   

小礼物走一走,来简书关注我

来自  https://www.jianshu.com/p/944c6fe07aa0



微信小程序 首行缩进、 去掉/取消首行缩进

2017年10月13日 10:47:27 武当山道士 阅读数:11766            


 版权声明:原创文章,欢迎任何形式的转载,但请务必注明出处~ https://blog.csdn.net/abs1004/article/details/78223269

首行缩进 .wxss 代码如下:

.str1{
  text-indent: 20rpx;

  text-align: left;
}
                
            
  • 1

  • 2

  • 3

  • 4

  • 5

               

//首行缩进20rpx

取消首行缩进

.str1{
  text-indent: 0rpx;
  padding-left: 0rpx;
  text-align: left;
}
                
            
  • 1

  • 2

  • 3

  • 4

  • 5

               

// 取消首行缩进,在小程序里光靠 text-indent:0rpx是不够的,必须加上 padding-left:0rpx;


来自  https://blog.csdn.net/abs1004/article/details/78223269

普通分类: