各种按钮的样式

例子:

代码:

<button type="button" disabled="disabled">button提交</button>
    <form action="" method="get">
        <input type="button" value="input button提交"/>
    </form>
    <a href="#" class="tj">a提交</a>
    <a class="btn btn-home" href="#">继续逛逛</a>
    <a class="btn btn-order" href="#">查看我的订单</a>

  <style>
    button, fieldset, img, input {
        border: none;
        outline: none;
        margin: 0;
        padding: 0;
    }
    a{
        text-decoration: none;
        outline: 0 none;
    }
    button,input[type='button'],.btn-sub{
        margin-bottom: 50px;
        width: 168px;
        line-height: 44px;
        font-size: 18px;
        font-weight: 500;
        color: #fff;
        text-align: center;
        cursor: pointer;
        height: 44px;
        border-radius: 44px;
        background-image: linear-gradient(to bottom,#ff785b,#ff3869);
        box-shadow: 0 4px 9px 0 #fbc1ba;
    }
    .btn-sub{
        display: block;
    }
    .btn {
        display: inline-block;
        width: 180px;
        height: 48px;
        line-height: 48px;
        text-align: center;
        border-radius: 48px;
        font-size: 19px;
        background: #fff;
    }
    /*继续逛逛*/
    .btn-home {
        margin-right: 30px;
        border: 1px solid #d0d0d0;
        color: gray;
    }
    /*查看我的订单*/
    .btn-order {
        background: #008ddc;
        color: #fff;
    }
    </style>

总结:a链接用于跳转的按钮,<button>用于在页面上触发js的按钮,input[type='button']用于在表单提交的按钮

转载于:https://my.oschina.net/u/3887849/blog/1841280

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值