基于css实现的响应式产品图文信息展示卡片

所属分类: 网页特效-其它&杂项    2023-12-10 11:30:35

基于css实现的响应式产品图文信息展示卡片 ie兼容6
反馈问题  查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

基于css实现的响应式产品图文信息展示卡片(共4个文件)

    • product.jpg
    • product2.jpg
    • index.html

使用方法

body {
    background-color: hsl(30, 38%, 92%);
    font-family: PingFang SC,Microsoft YaHei,sans-serif;
}

.cd__main{
   position: relative;
   display: block !important;
   min-height: 720px;
     background: linear-gradient(to right, #a8ff78, #78ffd6) !important;
}
  
.container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 600px;
    height: 450px;
    background-color: white;
    border-radius: 10px;
}

.left-side {
    background-image: url(../product.jpg);
    background-size: cover;
    background-position: center;
    border-radius: 10px 0px 0px 10px;
}

.right-side {
    margin: 20px 32px 32px 32px;
}

#perfume {
    font-size: 12px;
    letter-spacing: 5px;
    color: hsl(228, 12%, 48%);
}

#header {
    font-family: PingFang SC,Microsoft YaHei,sans-serif;
    line-height: 1;
    color: hsl(212, 21%, 14%);
    margin: 25px auto;
}

#description {
    font-size: 14px;
    color: hsl(228, 12%, 48%);
    line-height: 1.8;
    margin-bottom: 5px;
    margin-top: 20px
}


#number-discount, #number-full {
    display: inline-block;
    vertical-align: middle;
}

#number-discount {
    color: hsl(158, 36%, 37%);
    font-family: 'Fraunces', serif;
    margin-right: 10px;
}

#number-full {
    font-size: 14px;
    color: hsl(228, 12%, 48%);
    text-decoration: line-through;
}

.cart-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    border-radius: 10px;
    border: none;
    background-color: hsl(158, 36%, 37%);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    transition: background-color 0.2s;
    margin-top: 40px
}

.cart-btn:hover {
    background-color: hsl(156, 42%, 18%);
    cursor: pointer;
}

.cart-btn > svg {
    margin-left: -8px;
}

@media only screen and (max-width: 767px) {
    .container {
      grid-template-columns: 1fr;
      width: 345px;
      height: 610px;
    }

    .left-side {
        background-image: url(../product2.jpg);
        height: 240px;
        border-radius: 10px 10px 0 0;
    }

    #perfume {
        margin-top: 5px;
        margin-bottom: -10px;
    }

    #description {
        margin-top: -8px;
        margin-bottom: -1px;
    }

    .price {
        margin-bottom: -8px;
    }

    .cart-btn {
        height: 48px;
    }
  }

站长提示:
1. 平台上所有素材资源,需注册登录会员方能正常下载。
2. 会员用户积极反馈网站、素材资源BUG或错误问题,每次奖励20K币
3. PHP源码类素材,如需协助安装调试,或你有二次开发需求,可联系苦力吧客服。
4. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服
相关资源 / 其它&杂项

jquery响应式移动端列表菜单编辑插件Editable Listview

一款移动端可编辑添加的list列表菜单插件,功能强大!
  其它&杂项
 193  

jquery分步骤向导逐步推进特效代码

一款分步向导特效插件,带返回和确认按钮,点击下一步可推进显示。
  其它&杂项
 201  

jquery浮动滚动条插件

一款浮动的横向滚动条插件,当滚动右侧垂直滚动条时,该滚动条始终显示,
  其它&杂项
 204  

jquery可自定义的评分打分评级插件

一款简单的图标评分插件,支持自定义图标大小、数量、颜色等,有星星和爱心图标元素。
  其它&杂项
 186  

评论数(3) 回复有机会获得K币 用户协议

    何处不逢杨0
    2024-01-04 23:32:04
    不错刚好用到哦,感谢苦力吧
    回复 1
    xiaoshenzhen0
    2023-12-15 13:31:49
    这种响应式布局怎么做的,感觉好神奇😕
        jq小菜鸡
        2023-12-18 12:10:00
        根据分辨率来设置最大宽度和最小高度,然后各种百分比设置
    回复 2
😀
  • 😀
  • 😊
  • 😂
  • 😍
  • 😑
  • 😷
  • 😵
  • 😛
  • 😣
  • 😱
  • 😋
  • 😎
  • 😵
  • 😕
  • 😶
  • 😚
  • 😜
  • 😭
发表评论