• vue根据字体长度设置对应宽


    1. class="divWidth">
    2. {{ Obj.title }}
  • //data里面的obj是请求来的,title是文字字符串,就不写data的值了,本次条件是根据文字数量设置div的动态宽度
  • <style lang="scss" scoped>
  • .divWidth{
  • display: inline-block; //设置行内块,内容撑开宽高
  • width: auto; //默认宽
  • min-width: 200px; //最小宽
  • max-width: 500px; //最大宽
  • }
  • style>
  • 相关阅读:
    linux 安装nginx
    阿里云oss 批量下载图片(目标文件)阿里云oss
    入门篇-其之四-字符串String的简单使用
    三层交换、VLAN总结
    光源控制器光源亮度调节操作说明
    2023年上半年上午易错题(软件设计师考试)
    Prometheus远程存储方案
    LeetCode:200.岛屿数量
    Selenium基础 — POM设计模式(一)
    【Adobe Illustrator 教程】4. 认识渐变工具
  • 原文地址:https://blog.csdn.net/m0_64207574/article/details/126116286