shopify/html 物流单号查询

整体效果

liquid /html 代码

<div id="tracking">
        <h2>Tracking</h2>
        <input placeholder="Fill in the tracking number" type="text" name="text" class="input" id="input1">
        <button id="button1">
            <span>Search</span>
        </button>
    </div>

    <div id="tracking">
        <h2>SF Tracking</h2>
        <div class="des">*If your logistics tracking number starts with SF, please use the search box below to search
        </div>
        <input placeholder="Fill in the SF tracking number" type="text" name="text" class="input" id="input2">
        <button id="button2">
            <span>Search</span>
        </button>
 </div>

 <script>
    $("#button1").click(function () {
        var input1 = $("#input1").val();
        if (input1 != "") {
            window.open("https://t.17track.net/en#nums=" + input1);
        } else {
            alert("Please fill in the logistics number");
        }
    });
    $("#button2").click(function () {
        var input2 = $("#input2").val();
        if (input2 != "") {
            window.open("https://www.sf-international.com/cn/en/support/querySupport/waybill?No=" + input2);
        } else {
            alert("Please fill in the logistics number");
        }
    });
</script>
  
  <style>
     #tracking{
    margin: 50px auto;
    width: 100%;
       }
    
        #tracking .input {
               width: 100%;
                max-width: 280px;
                font-size: small;
                height: 4.2em;
                margin-bottom: 30px;
                padding: 12px;
                border-radius: 12px;
                border: 1.5px solid lightgrey;
                outline: none;
                transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
                box-shadow: 0px 0px 20px -18px;
        }

        #tracking .input:hover {
            border: 2px solid lightgrey;
            box-shadow: 0px 0px 20px -17px;
        }

        #tracking .input:active {
            transform: scale(0.95);
        }

        #tracking .input:focus {
            border: 2px solid grey;
        }

        /* From Uiverse.io by NorthFishHasNa */
        #tracking button {
            display: inline-block;
            border-radius: 4px;
            background-color: #3d405b;
            border: none;
            color: #FFFFFF;
            text-align: center;
            font-size: 17px;
            padding: 13px;
            width: 130px;
            transition: all 0.5s;
            cursor: pointer;
            margin: 5px;
        }

        #tracking button span {
            cursor: pointer;
            display: inline-block;
            position: relative;
            transition: 0.5s;
        }

        #tracking button span:after {
            content: '»';
            position: absolute;
            opacity: 0;
            top: 0;
            right: -15px;
            transition: 0.5s;
        }

        #tracking button:hover span {
            padding-right: 15px;
        }

        #tracking button:hover span:after {
            opacity: 1;
            right: 0;
        }

        #tracking .des{
            font-size: small;
            margin-bottom: 20px;
            color: rgb(117, 117, 117);
        }
    </style>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值