uni-app的css样式

uni-app的css样式,我想要背景颜色的长度是根据文字长度来的,但是我现在把长度的代码注释就变成一长条了,


<view class="iphone-flex">
                <view>
                    <image class="iphone" src="../../static/tab/iPhone.png">image>
                view>
                <view>
                    <span class="iPhone-text">iPhone 14 Prospan>
                view>
            view>
.iphone {
        width: 20px;
        height: 20px;
        margin-left: 5px;
        position: relative;
        top: 5px;
    }

    .iphone-flex {
        width: 140px;
        height: 33px;
        background: #f3f4f8;
        border-radius: 10px;
        display: flex;
        line-height: 33px;
        margin-left: 20px;
        margin-top: 10px
    }

    .iPhone-text {
        font-size: 14px;
        color: #9a9b9f;
        margin-left: 5px;
    }

img

img


.iphone-flex{
  display:inline-flex;
}