首页 > 编程知识 正文

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

时间:2023-05-03 12:10:48 阅读:198437 作者:1126

.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-type(2) {

align-self: flex-end;

}

.third-face {

display: flex;

justify-content: space-between;

}

.third-face .pip:nth-of-type(2) {

align-self: center;

}

.third-face .pip:nth-of-type(3) {

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-type(2) {

justify-content: center;

}

/* OTHER STYLES */

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: 'Open Sans', sans-serif;

background: linear-gradient(top, #222, #333);

}

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实现骰子布局

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。