【css/js】商品升序降序排列。

实现功能:

点击三个不同的按钮,实现按照随机排序、升序、降序排列。

 

 

源码下载地址链接:

https://pan.baidu.com/s/1VEgJ7ckOiqQjKLe5XAQ7kQ 提取码: r5dm 复制这段内容后打开百度网盘手机App,操作更方便哦

源码文档:

-------------------------------------------------------------------这是分割线--------------------------------------------------------

 

<!DOCTYPE html>
<html lang="ZH-cn">

<head>
    <meta charset="UTF-8">
    <title>商品排序</title>
    <style>
        .box {
            position: relative;
            width: 800px;
            height: 520px;
            border: 1px solid #c9c9c9;
            border-radius: 3px;
            margin: 100px auto;
            overflow: hidden;
        }

        ul {
            padding-left: 0;
            margin: 0;
            list-style: none;
            width: 750px;
            height: 390px;
            position: absolute;
            top: 34px;
            left: 34px;
        }

        ul li {
            position: relative;
            width: 174px;
            height: 200px;
            float: left;
            margin: 15px 11px 0 0;
            transition-duration: 0.5s;
            transition-timing-function: linear;
            cursor: pointer;
            box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.5);
        }

        /*悬停在li往上浮动*/
        ul li:hover {
            transform: translateY(-10px);

        }

        ul li img {
            width: 174px;
            height: 174px;
            float: left;
        }


        /*超出...显示*/
        ul li span.msg {
            font-size: 12px;
            font-weight: 400;
            line-height: 18px;

            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            width: 125px;
            height: 18px;
            display: block;
        }


        ul li .msgBox.show {
            position: absolute;
            z-index: 100;
            width: 170px;
            height: 35px;
            /* background-color: skyblue; */
            font-size: 12px;
            color: violet;

        }

        ul li .priceArea {
            position: absolute;
            width: 45px;
            height: 50px;
            bottom: 0px;
            right: 0px;
            background-color: #f04a40;
            border-radius: 50%;
            transform: rotate(30deg);
        }


        ul li .priceArea .price {
            display: block;
            transform: rotate(-30deg);
            color: #ffffff;
            font-size: 14px;
            font-weight: bold;
            line-height: 50px;
        }

        .box .buttonArea {
            position: absolute;

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值