css3 transform 平移,CSS3 Transform 方法演示

CSS

语言:

CSSSCSS

确定

html {

font-size: 24px;

}

body {

font-size: .65rem;

font-family: PT Sans Caption;

line-height: @fontsize;

color: #CBA;

background: #C9C8CA;

}

#bugs {

position: absolute;

display: inline-block;

height: 150px;

width: 150px;

left: 45%;

top: 35%;

background: url(http://static.tumblr.com/28b4d2eb44e1190c2273802c444534d5/3fzcjhe/fwxmy5a0l/tumblr_static_bugs-bunny-bugs-bunny-26143775-500-355.jpg);

background-size: 100%;

}

.panel {

position: absolute;

display: inline-block;

margin: 1rem;

background: linear-gradient(to bottom, #444246, #323034);

width: 7rem;

padding: .5rem 1rem;

border-radius: .5rem;

box-shadow: 0 0 0 1px #000, 0 3px 1px -1px #444;

}

.ni,

span {

position: relative;

display: block;

}

.ni {

padding-bottom: .5rem;

}

.ni label {

position: absolute;

bottom: 8px;

display: inline-block;

width: 1rem;

font-size: .5rem;

}

.ni label:last-child {

right: 0;

}

.btn {

display: inline-block;

position: relative;

padding: 2px 6px;

border-radius: 8px;

box-shadow: 0 0 0 1px #000;

background: linear-gradient(to bottom, #700, #500);

cursor: pointer;

}

input[type=range] {

-webkit-appearance: none;

position: relative;

height: 1px;

width: 6rem;

top: -8px;

}

input[type=range]:focus {

outline: none;

background: #800;

}

input[type=range]::-moz-range-track {

width: 100%;

background: #242424;

}

input[type=range]::-moz-range-thumb {

background: #A6A4A8;

border: 0;

height: .5rem;

width: .5rem;

box-shadow: 2px 2px 1px #000;

}

.lock {

position: absolute;

display: inline-block;

right: -.75rem;

bottom: .8rem;

font-family: FontAwesome;

}

input[type=checkbox] {

display: none;

}

input[type=checkbox] + label:after {

content: '\f127';

font-size: .75rem;

}

input[type=checkbox]:checked + label:after {

font-family: FontAwesome;

content: '\f0c1';

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值