20160210 css 布局

css 布局

/* 父 div */
#toolbar .menu .menu-item {
    border-radius: 6px;
    -webkit-transition: all .3s;
    transition: all .3s;
    width: 60px;
    height: 60px;
    cursor: pointer;
    text-align: center;
    float: left;
    margin: 8px 8px 0;
    position: relative;
    padding: 8px;
    background-color: #eee;
    box-shadow: 0 1px 3px 0 #000,inset 0 -2px 0 0 rgba(0,0,0,.3),inset 0 -1px 1px 2px rgba(255,255,255,.35);
}
/* 子 div */
#toolbar .menu .menu-item div:first-child{
    position: relative;
    height: 100%;
    -webkit-transform: scale(.6);
    -ms-transform: scale(.6);
    transform: scale(.6);
}

相当于按钮中间有一个图标

canvas 响应式画板 图标按钮