html/css中国风按钮样式

想模仿这个

根据页面风格去掉了圆角部分,简单模仿了个出来,结果特别像电池。555~~

 

这次没用上,先备份了,以后再用时候可以直接拿过来改改再用。

<div class="navbar">
                <a class="nav" href="javascript:getQuestion('back');">
                    <div class="left-bg">
                        <div class="squre"></div>
                    </div>
                    上一题
                    <div class="right-bg">
                        <div class="squre"></div>
                    </div>
                </a>
                <a class="nav" href="javascript:getQuestion('next');">
                    <div class="left-bg">
                        <div class="squre"></div>
                    </div>
                    下一题
                    <div class="right-bg">
                        <div class="squre"></div>
                    </div>
                </a>
            </div>

.submitArea .navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-content: center;
    align-items: center;
}

.submitArea .navbar .nav {
    position: relative;
    width: 94px;
    height: 33px;
    line-height: 33px;
    margin: 0 15px;
    padding: 0;
    color: #fff;
    border-radius: 0;
    background: #7F9BDC;
    border: 1px solid #7F9BDC;
    box-sizing: border-box;
    text-align: center;
    opacity: 0.7;
}

.left-bg, .right-bg {
    display: block;
    position: absolute;
    top: 5px;
    left: -7px;
    width: 8px;
    height: 20px;
    border-radius: 0;
    background: #7F9BDC;
}

.right-bg {
    left: auto;
    right: -7px;
}


.submitArea .navbar
.nav:after {
    display: block;
    position: absolute;
    top: 3px;
    left: 4px;
    width: 85px;
    height: 25px;
    content: '';
    border-radius: 0;
    border: 1px solid rgba(255,255,255,0.7);
    box-sizing: border-box;
}

.left-bg:after, .right-bg:after {
    display: block;
    position: absolute;
    top: 3px;
    left: 4px;
    width: 9px;
    height: 14px;
    content: '';
    background: #7F9BDC;
    border: 1px solid;
    border-color: rgba(255,255,255,0.7) transparent rgba(255,255,255,0.7) rgba(255,255,255,0.7);
    box-sizing: border-box;
    z-index: 9;
}

.right-bg:after {
    left: auto;
    right: 4px;
    border-color: rgba(255,255,255,0.7) rgba(255,255,255,0.7) rgba(255,255,255,0.7) transparent;
}

.squre, .squre:after {
    position: absolute;
    left: 11px;
    top: 3px;
    width: 3px;
    height: 3px;
    /* background: rgba(255,255,255,0.7); */
    border: 1px solid rgba(255,255,255,0.7);
    z-index: 99;
    box-sizing: border-box;
}


.squre:after {
    left: -1px;
    top: auto;
    bottom: -12px;
    content: '';
}

.right-bg .squre, .right-bg .squre:after {
    left: auto;
    right: 10px;
}

.right-bg .squre:after {
    right: -1px;
}

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值