

https://github.com/comehope/front-end-daily-challenges
定义 dom,容器中包含 2 个元素,分别代表 logo 和进度条,logo 又包含 3 段文字:
<div class="windows-boot"> <div class="logo"> <p class="ms">Microsoft</p> <p class="win">Windows</p> <p class="pro">Professional</p> </div> <div class="bar"></div> </div>
居中显示:
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: black;
}定义容器尺寸:
.windows-boot {
width: 21.5em;
height: 15em;
}设置段落样式:
.logo p {
color: white;
font-family: sans-serif;
margin: 0;
padding: 0;
}设置字号:
.logo .ms {
font-size: 1.6em;
}
.logo .win {
font-size: 4.2em;
}
.logo .pro {
font-size: 3em;
}设置字体粗细:
.logo .ms {
font-weight: lighter;
}
.logo .win {
font-weight: bold;
}
.logo .pro {
font-weight: lighter;
}设置行高:
.logo .ms {
line-height: 1em;
}
.logo .win {
line-height: 86%;
}
.logo .pro {
line-height: 1em;
padding-left: 0.2em;
}在 "Microsoft" 后面增加商标版权符号:
.logo .ms::after {
content: '