css flex布局 阮一峰,flex布局 阮一峰

.first-face {

display: flex;

align-items: flex-end;

justify-content: flex-end;

}

.second-face {

display: flex;

justify-content:space-between;

}

.second-face .pip:nth-of-type2) {

align-self: flex-end;

}

.third-face {

display: flex;

justify-content: space-between;

}

.third-face .pip:nth-of-type2) {

align-self: center;

}

.third-face .pip:nth-of-type3) {

align-self: flex-end;

}

.fourth-face, .sixth-face {

display: flex;

justify-content: space-between;

}

.fourth-face .column, .sixth-face .column {

display: flex;

flex-direction: column;

justify-content: space-between;

}

.fifth-face {

display: flex;

justify-content: space-between;

}

.fifth-face .column {

display: flex;

flex-direction: column;

justify-content: space-between;

}

.fifth-face .column:nth-of-type2) {

justify-content: center;

}

/* OTHER STYLES */

<p年轻的小蘑菇 {

box-sizing: border-box;

}

html, body {

height: 100%;

}

body {

display: flex;

align-items: center;

justify-content: center;

vertical-align: center;

flex-wrap: wrap;

align-content: center;

font-family: ‘Op快三稳赚10大技巧t: center;

font-family: ‘Open Sans’, sans-serif;

background: linear-gradienttop, #222, #333);

}

<p精明的嚓茶class$="face"] {

margin: 16px;

padding: xsdfn;

background-color: #e7e7e7;

width: 10xsdfn;

height: 10xsdfn;

object-fit: contain;

box-shadow:

inset 0 5px white,

inset 0 -5px #bbb,

inset 5px 0 #d7d7d7,

inset -5px 0 #d7d7d7;

border-radius: 10%;

}

.pip {

display: block;

width: 2xsdfn;

height: 2xsdfn;

border-radius: 50%;

margin: xsdfn;

background-color: #333;

box-shadow: inset 0 3px #111, inset 0 -3px #555;

}

flex实现骰子布局

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注