div和span区别/font-weight

①div和span的区别

这里写图片描述

<style>
        div{
            width: 200px;
            height: 20px;
            background: red;
            margin-bottom: 5px;
        }
        span{
            width: 200px;
            height: 20px;
            background: blue;
        }
    </style>
</head>
<body>
    <div>yyc1</div>
    <div>yyc2</div>
    <div>yyc1 | yyc2</div>
    <span>yyc3</span>
    <span>yyc4 | yyc5</span>
    <span>yyc6 |yyc7 | yyc8</span>
    <span>
        yyc yyc yyc yyc yyc yyc yyc yyc 
        yyc yyc yyc yyc yyc yyc yyc yyc yyc
        yyc yyc yyc yyc yyc yyc yyc 
    </span>
    <p>div:严格按照设置尺寸,多余空间空着。</p>
    <p>span:有多少内容用多少空间。</p>
</body>

参考:【div与span区别及用法】http://www.divcss5.com/rumen/r79.shtml

②函数运行时间

这里写图片描述

font-weight: bold;
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
你可以尝试在每个 `<el-col>` 元素中添加 `align="center"` 属性,同时在最外层的 `<el-row>` 元素中添加 `justify="center"` 属性,代码如下: ``` <el-row justify="center"> <el-col :span="5" align="center"> <el-card style="color:#409EFF"> <div style="color:#409EFF"><i class="el-icon-s-shop"/>能力发布驳回数</div> <div style="padding:10px 0;text-align:center;font-weight:bold">100</div> </el-card> </el-col> <el-col :span="5" align="center"> <el-card style="color:#409EFF"> <div style="color:#409EFF"><i class="el-icon-s-shop"/>人工告警数量</div> <div style="padding:10px 0;text-align:center;font-weight:bold">100</div> </el-card> </el-col> <el-col :span="5" align="center"> <el-card style="color:#409EFF"> <div style="color:#409EFF"><i class="el-icon-s-shop"/>自动告警数量</div> <div style="padding:10px 0;text-align:center;font-weight:bold">100</div> </el-card> </el-col> <el-col :span="5" align="center"> <el-card style="color:#409EFF"> <div style="color:#409EFF"><i class="el-icon-s-shop"/>钉钉告警数量</div> <div style="padding:10px 0;text-align:center;font-weight:bold">100</div> </el-card> </el-col> <el-col :span="5" align="center"> <el-card style="color:#409EFF"> <div style="color:#409EFF"><i class="el-icon-s-shop"/>BOMC告警数量</div> <div style="padding:10px 0;text-align:center;font-weight:bold">100</div> </el-card> </el-col> </el-row> ``` 这样设置后,每个卡片的宽度会被限定在 `<el-col>` 元素的宽度内,同时 `<el-row>` 元素的 `justify` 属性可以让所有的元素在水平方向上居中对齐。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值