第十三届蓝桥杯(Web 应用开发)线上模拟赛【第五题】(制作网站首页)

考试需求

请完善 css/style.css 样式文件,让知乎日报首页呈现如下所示的效果(页面整体宽度 1024px):
"
关键尺寸批注如下:(可以通过在图片上右键-》“在新标签页打开图片”,或在右键-》复制图片地址后到浏览器新标签页打开并放大图片,查看关键尺寸

解决办法

先把index.html的左上角logo文字换成图片logo.png
通过调节css来实现对页面的布局

参考代码

index.html更换logo部分
在这里插入图片描述

css/style.css

#body {
    width: 1024px;
}
#body > header {
    height: 78px
}
#body > header > nav > div {
    float: right;
}
#body > header > nav > div > a {
    display: inline-block;
    width: 120px;
    height: 32px;
    text-align: center;
    line-height: 32px;
    text-decoration: none;
    color: #777;
}
#body > header > nav > div > a:hover {
    background-color: #f0f9ff;
    color: #0099f2;
}
#body > section.banner > div {
    background-color: #008bed;
}
#body > section.banner > div > div:nth-child(1) {
    display: inline-block;
}
#body > section.banner > div > div.content {
    padding-top: 100px;
    padding-left: 100px;
    width: 420px;
    display: inline-block;
    vertical-align: top;
}
#body > section.banner > div > div.content > h2 {
    font-size: 40px;
    line-height: 40px;
    color: #fdfdfd;
}
#body > section.banner > div > div.content > div {
    font-size: 16px;
    line-height: 24px;
    color: #99d1f8;
}
#tabtitle {
    width: 960px;
    height: 100px;
}
#tabtitle > h3 {
    color: #000000;
    font-size: 24px;
    float: left;
}
#tabtitle > h4 {
    color: #cccccc;
    font-size: 24px;
    float: right;
}
#body > section.list > ul > li > a > img {
    padding-left: 24px;
    width: 260px;
    height: 260px;
}
#body > section.list > ul > li {
    text-align: center;
    display: inline-block;
    width: 300px;
    height: 374px;
    vertical-align: -webkit-baseline-middle;
    margin-bottom: 20px;
    margin-right: 30px;
    background-color: #ffffff;
}
#body > section.list {
    background-color: #f9f9f9;
}
#body > section.list > ul {
    padding-left: 20px;
}
#body > section.list > ul > li > a {
    text-decoration: none;
    color: #333333;
}
#body > section.list > div {
    
    padding-left: 20px;
    text-align: center;
    background-color: #e8eef2;
}
#body > section.list > div > a {
    color: #59abdf;
    line-height: 62px;
    text-decoration: none;
    font-size: 20px;
}
#body > footer {
    margin-top: 20px;
    background-color: #e5e5e5;
    height: 265px;
}
#body > footer > div > div.footerL {
    float: left;
    width: 710px;
    margin-top: 32px;
    height: 210px;
}
#body > footer > div > div.footerR {
    float: right;
    padding: 30px;
    text-align: center;
}

最终效果图:
在这里插入图片描述

)在这里插入图片描述
在这里插入图片描述

  • 4
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

左手八嘎呀路

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值