css绘制现代房屋大树艺术效果代码
代码语言:html
所属分类:布局界面
代码描述:css绘制现代房屋大树艺术效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
box-sizing: border-box;
}
.wrapper {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
height: 100vh;
width: 100%;
background: #cbe0f4;
}
.road {
height: calc(4 * 1vmin);
width: 100%;
background: #575757;
}
.grass {
height: calc(2 * 1vmin);
width: 100%;
background: #859e53;
}
.building {
width: calc(1vmin * 29);
height: calc(1vmin * 32.5);
border-left: calc(1.5 * 1vmin) solid #fff;
border-right: calc(1.5 * 1vmin) solid #fff;
background: #fff;
position: relative;
}
.roof {
width: 0;
height: 0;
border-style: solid;
border-width: 0 calc(14.5 * 1vmin) calc(12 * 1vmin) calc(14.5 * 1vmin);
border-color: transparent transparent #fff transparent;
position: relative;
}
.roofInner {
width: 0;
height: 0;
border-style: solid;
border-width: 0 calc(13 * 1vmin) calc(11 * 1vmin) calc(13 * 1vmin);
border-color: transparent transparent transparent transparent;
position: absolute;
top: calc(2 * 1vmin);
left: 0;
transform: translateX(-50%);
}
.roofPatch1 {
width: calc(2 * 1vmin);
height: 1vmin;
background: #fff;
position: absolute;
left: calc(-13.5 * 1vmin);
top: calc(12 * 1vmin);
}
.roofPatch2 {
width: calc(2 * 1vmin);
height: 1vmin;
background: #fff;
position: absolute;
right: calc(-13.5 * 1vmin);
top: calc(12 * 1vmin);
}
.roofPatch3 {
width: 1vmin;
height: calc(3 * 1vmin);
background: #fff;
position: absolute;
left: calc(-14.05 * 1vmin);
top: calc(13 * 1vmin);
z-index: 6;
}
.roofPatch4 {
width: 1vmin;
height: calc(3 * 1vmin);
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0