微信小程序边框内部距离文字的距离可以调吗?

小程序 文章 2021-12-22 10:00 1096 0 全屏看文

AI助手支持GPT4.0

微信小程序边框内部距离文字的距离可以调吗?Can the distance between the inside of the WeChat applet frame and the text be adjusted?

微信小程序边框内部距离文字的距离可以调吗?
.tags .tag1,.tags .tag2{  position: relative;  top25%;  margin-right20rpx;  font-size26rpx;  color: orange;  opacity0.7;  box-sizing: border-box;  height42rpx;  border4rpx solid orange;  letter-spacing2rpx;}

就比如说我上面这个代码写出来,根据图片可以看出,文字跟边框的距离太紧凑了,想要距离大一点是通过什么属性来设置呢?我记得是有的,我以前写过给忘了。

. tags . tag1,. tags . tag2{  position: relative;  top: 25%;  margin-right: 20rpx;  font-size: 26rpx;  color: orange;  opacity: 0.7;  box-sizing: border-box;  height: 42rpx;  border: 4rpx solid orange;  letter-spacing: 2rpx;} For example, I wrote the code above. According to the picture, the distance between the text and the border is too close. What attribute is used to set the distance to be larger? I remember. I forgot about it before.

回答:

Lv: Max Human:
.tag1,.tag2{  margin-right20rpx;  font-size26rpx;  color: orange;  height42rpx;  border4rpx solid orange;  padding: 0 6rpx;  }
微喵网络:

padding

garField:

padding

-EOF-

AI助手支持GPT4.0