html如何实现滑动按钮,CSS滑动按钮

css

html {

font-family: 'Inconsolata', monospace;

font-weight: 700;

font-size: 20px;

}

html, body {

height: 100%;

width: 100%;

margin: 0;

background: #2c3e50;

}

.main {

width: 100%;

height: 100%;

background-color: #2c3e50;

}

.group {

width: 340px;

height: 40px;

padding: 10px 40px;

line-height: 40px;

position: relative;

z-index: 1;

margin-left: auto;

margin-right: auto;

margin-top: 100px;

}

.one {

float: left;

line-height: 40px;

color: white;

text-decoration: none;

transition: 1.0s;

}

.two {

float: right;

text-decoration: none;

line-height: 40px;

color: #a6afbf;

}

.bg {

background-color: #e67e22;

height: 60px;

width: 190px;

position: absolute;

top: 0;

margin-left: -260px;

z-index: -1;

transition: 1.0s;

border-radius: 5px;

}

span:hover + .bg {

width: 200px;

margin-left: -40px;

background: #27ae60;

}

.two > span:hover {

color: white;

}

.two:hover ~ .one {

color:#fff;

}

span {

padding: 10px 0;

transition: 1.0s;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值