codeing or artist ?
记得大学第一节编程课,教授说,"如果一件事儿有对错,那么是科学。如果有美丑好坏,那么是艺术。" 一个能顺利运行还能让人阅读时体验思维美妙的代码,就是艺术和科学的结合。能运行的程序并不是好程序,能当作文章来读的才是。在我看来代码是一种特殊的文体,程序猿其实会写诗。
<div class="page-product-list">
    <div class="thumbnail">
        <div class="img">
            <img src="https://aecpm.alicdn.com/simba/img/TB1XotJXQfb_uJkSnhJSuvdDVXa.jpg">
        </div>
    </div>
    <div class="thumbnail">
        <div class="img">
            <img src="https://aecpm.alicdn.com/simba/img/TB1j4LLKpXXXXcbaXXXSutbFXXX.jpg">
        </div>
    </div>
    <div class="thumbnail">
        <div class="img">
            <img src="https://img.alicdn.com/tps/i4/https://img.alicdn.com/imgextra/i3/6000000005261/O1CN01EPZf8u1ojaKW98tV1_!!6000000005261-0-octopus.jpg_240x240q90.jpg">
        </div>
    </div>
</div>
.page-product-list{position:relative;}
.page-product-list:after{content:"";clear:both;display:block;}
.page-product-list .thumbnail{width:33.3333%;padding:5px;float:left;}
.page-product-list .img{overflow:hidden;position:relative;width:100%;height:0;padding-bottom:100%;display:flex;justify-content:center;align-items:center;}
.page-product-list .img img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover;}

效果图:

posted on 2020-10-14 10:38  codeing-or-artist-??  阅读(521)  评论(0编辑  收藏  举报