示例样式(scss):
$color:red;
$bgcolor:#F4F5F9;
* {
margin: 0;
padding: 0;
}
.div1 {
height: 40px;
background-color: $color;
width: 100%;
ul {
width: 1230px;
margin: 0 auto;
list-style: none;
display: flex;
justify-content: space-between;
li {
a {
color: white;
line-height: 40px;
text-decoration: none;
&:hover {
color: pink;
}
}
}
}
}
.div2 {
ul {
width: 1230px;
margin: 0 auto;
display: flex;
justify-content: space-between;
margin-bottom: 20px;
li {
width: 395px;
height: 200px;
display: flex;
justify-content: space-between;
// border: 1px solid red;
background-color: $bgcolor;
box-shadow: 5px 5px 5px #ccc;
.left {
width: 200px;
}
.right {
width: 200px;
padding: 10px 20px;
h3 {
margin-bottom: 18px;
}
p {
margin-bottom: 18px;
font-size: 24px;
}
span {
display: bl