html+css实战65-综合案例4-产品-文字效果

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <style>
        body{
            background-color: #f5f5f5;
        }
        .goods{
            width: 234px;
            height: 300px;
            background-color: #fff;
            /* 样式居中 */
            margin: 0 auto;
            text-align: center;
        }
        img{
            width: 160px;
        }
        .title{
            font-size: 14px;
            line-height: 25px;
        }
        .info{
            color: #ccc;
            font-size: 12px;
            line-height: 30px;
        }
        .money{
            font-size: 14px;
            color: aquamarine;
        }
    </style>
</body>
<div class="goods">
    <img src="./images/geyao.jpg" alt="歌谣" title="歌谣">
    <div class="title">我是歌谣</div>
    <div class="info">前端分享者</div>
    <div class="money">公众号关注前端小歌谣</div>
</div>
</html>

运行结果

猜你喜欢

转载自blog.csdn.net/geyaoisnice/article/details/125090181