手机商品分享样式(纯html+css)

效果图:

html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="tag.css">
</head>
<body>
    <div class="tag">
        <div class="title">
            <div class="position title1">
                <div>
                    <img class="imgShop" src="1.png" alt="">
                </div>
            </div>
            <div class="position title2">
                <div class="fs12">
                    <b>永玲麟</b>
                </div>
                <div class="fs10">
                    为你挑选了一个好物
                </div>
            </div>
        </div>
        <div class="bodyImg">
            <div>
                <img class="imgDetails" src="1.png" alt="">
            </div>
            <div class="Price">
                <span class="symbol">¥</span><span class="price">19.90 - 999.00</span>
            </div>
            <div class="footDiv">
                <div class="position introduce">
                    <b>阿杜佛爱神的箭佛山大佛山的山东法撒旦法士大夫沙发斯蒂芬阿斯蒂芬</b>
                </div>
                <div class="position poImg">
                    <img class="imgCode" src="二维码.png" alt="">
                </div>
            </div>
        </div>
    </div>
</body>
</html>

css:

body{
    margin: 0;
    padding: 0;
}
.tag{
    border-radius: 8px;
    height: 505px;
    width: 300px;
}
.title{
    padding-top: 28px;
    margin: 0 0 0 14px;
    position: relative;
    height: 52px;
}
.imgShop{
    width: 40px;
    height: 40px;
    border-radius: 40px;
}
.fs12{
    font-size: 14px;
}
.fs10{
    font-size: 10px;
    color: #CACACA;
    margin-top: 6px;
}
.position{
    position: absolute;
}
.title2{
    left: 50px;

}
.bodyImg{
    margin-left: 13px;
    border-radius: 8px;
    height: 400px;
    width: 275px;
    box-shadow: 0px 0px 5px #E1E1E1;
}
.bodyImg>div>img{
    width: 275px;
    height: 275px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    
}
.Price{
    margin-left: 10px;
}
.symbol{
    font-size: 16px;
    color: #F64945;
}
.price{
    font-size: 24px;
    color: #F64945;
}
.footDiv{
    position: relative;
}
.imgCode{
    width: 55px;
    height: 55px;
}
.poImg{
    left: 207px;
    top: 24px;
}
.introduce{
    margin: 45px 0 0 14px;
    width: 150px;
    font-size: 13px;
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

猜你喜欢

转载自www.cnblogs.com/guomouren/p/12706540.html