前端工程学习日记第6天

作业错误:

  1. ul 标签使用上有误哦!ul 的子层只能是 li,也不能单独使用 li 没有 ul 包覆

如下范例

  1. 文章内容要避免使用 < 这个符号,因为用来包覆 HTML 标签的也是这个符号,这样会导致网页显示错误

#两栏式、三栏式版面定位技巧:透过main统一向下推20px

为何字会跑出去? 原因是因为写死了 menu height 50px 无法跟着做推挤

200+10+790=1000

https://ithelp.ithome.com.tw/upload/images/20201107/20132398TrJZzqiXSA.png两栏式、三栏式版面定位技巧
把它删掉就可以
https://ithelp.ithome.com.tw/upload/images/20201107/20132398f5Z5JgDIkj.png
https://ithelp.ithome.com.tw/upload/images/20201107/20132398i86SVIPLyL.png

看padding 多一点留白 padding: 10 10 10 10 但右边粉红色区块又被挡住10+10+200=220

https://ithelp.ithome.com.tw/upload/images/20201107/20132398dqNofu07SR.png
https://ithelp.ithome.com.tw/upload/images/20201107/20132398nXEvUXaqY6.png

直接从chrome检查器里改200 to 180px
https://ithelp.ithome.com.tw/upload/images/20201107/20132398BElkSoaHLN.png

https://ithelp.ithome.com.tw/upload/images/20201107/20132398TO0kjgXdpe.png
把文字放到main里面里面

clearfix 记得要放在浮动的下面,让footer可以正常显示
https://ithelp.ithome.com.tw/upload/images/20201107/20132398dgZdP7HrWP.png
https://ithelp.ithome.com.tw/upload/images/20201107/20132398nQPps6tiqe.png

#设计并排式选单 : 横排的连结区块
ul>li*5>a 五个都是连结
https://ithelp.ithome.com.tw/upload/images/20201107/20132398VtsWcE1Hed.png
https://ithelp.ithome.com.tw/upload/images/20201107/20132398Am4L4nbX6R.png
ul li 是区块元素所以不会并排在一起
https://ithelp.ithome.com.tw/upload/images/20201107/20132398LEpJM3KYzJ.png
现在需要把符号编码隐藏起来,并把样式归零。 css reset
https://ithelp.ithome.com.tw/upload/images/20201107/20132398TFb34RMlzo.png
![https://ithelp.ithome.com.tw/upload/images/20201107/20132398z85ETNDUWJ.png]
版型跑掉了
(https://ithelp.ithome.com.tw/upload/images/20201107/20132398z85ETNDUWJ.png)
topmenu {height50px}
https://ithelp.ithome.com.tw/upload/images/20201107/20132398snJUpwcaYJ.png

https://ithelp.ithome.com.tw/upload/images/20201107/20132398baaxyu25Nz.png
https://ithelp.ithome.com.tw/upload/images/20201107/201323988oe9djwdcF.png

还没有背景颜色以及下底线 文字颜色白色用#fff
https://ithelp.ithome.com.tw/upload/images/20201107/20132398BLLFU54QWl.png
https://ithelp.ithome.com.tw/upload/images/20201107/20132398sqLc9Cwbq8.png

text-align:center文字置中
text-decoration:none 拿掉文字连结的下底线
https://ithelp.ithome.com.tw/upload/images/20201107/20132398pWXQcCNis7.png

https://ithelp.ithome.com.tw/upload/images/20201107/20132398mlFgSc9a0H.png
上图存档後会变成
https://ithelp.ithome.com.tw/upload/images/20201107/20132398OXkP1rCMfV.png

https://ithelp.ithome.com.tw/upload/images/20201107/201323986tdEhI8WcB.png
line-height:50px之後字高度中间就会变字。
.topmenu li a :hover{ background: orange

可以复习第二章节:区块和行内的小节

https://ithelp.ithome.com.tw/upload/images/20201107/20132398jjT1YIQ12x.png

整体先float:right
ul 先向右推20
https://ithelp.ithome.com.tw/upload/images/20201108/20132398uVysRjI5ga.png

再来调整li的细节 三个li
https://ithelp.ithome.com.tw/upload/images/20201108/201323983e9wmRzAZa.png

假设head区块logo在左边。 ul li也浮动在左边的做法
先给logo picture做 a herf="#" class="logo">

https://ithelp.ithome.com.tw/upload/images/20201108/20132398hmSPCvbKZw.png

css
https://ithelp.ithome.com.tw/upload/images/20201108/20132398CgNtuwZm7m.png

https://ithelp.ithome.com.tw/upload/images/20201108/201323984XRo4TABeA.png

https://ithelp.ithome.com.tw/upload/images/20201108/20132398kuzPxVOukn.png


<<:  CSS Of Norton Antivirus By InstallNSetup.Com

>>:  JS 宽松相等、严格相等以及隐含转型 DAY54

盘点清查与检测扫描 - 盘点文件、清查旧系统、帐号

原本以为 0 存档挑战会失败,想不到不知不觉就完成铁人赛了。果然加了「轻松小单元」好轻松。 适用人员...

004-元件名称

再刚开始阅读文章时,必须先了解一下各部位的名称,本篇就来快速介绍手机的各部位一下吧。 1.Statu...

好记性的浏览器:localStorage

谈这个主题之前,我们先来回忆一下日常的场景,你来到桃子购物网站,选了你要的商品往下卷动网页,结果竟...

[Day17]非相关子查询

什麽是子查询,这里举一个简单的例子为大家说明:在HR帐户中,查询公司内何者的薪水比Irene高? 通...

资讯安全

-资讯安全 安全是指保护某物免受危险或威胁的过程和达到的状态。 资讯安全是一门通过安全控制保护资讯...