CSS class starting with number is not getting applied

前端 未结 4 1658
死守一世寂寞
死守一世寂寞 2020-12-20 07:19

I\'m trying to create a webpage that contains images. However, I want all the images to be the same size and in the same format. I have the following CSS class which applies

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-20 08:19

    you Should not begin class name with number preferably.for fix it ,change class name.

    .img-container {
        border: thin solid #C4C4C4;
        border-radius: 10px;
        overflow: hidden;
        margin-left: auto;
        margin-right: auto;
    }
    
    .c200 {
        width: 200px;
        height: 200px;
    } 

提交回复
热议问题