请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

icons这个模块 icon没有上下居中呢

https://img1.sycdn.imooc.com//szimg/5d54bdbf094f4af205240748.jpg

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.icon
positionrelative
overflowhidden
floatleft
width25%
height0
padding-bottom25%
.icon-img
positionabsolute
top0
left0
right0
bottom: .44rem
box-sizing: border-box
padding: .1rem
.icon-img-content
displayblock
margin0 auto
height100%


正在回答 回答被采纳积分+3

插入代码

1回答

Dell 2019-08-17 22:44:49

你这个top设置成0,当然不能垂直居中了

1 回复 有任何疑惑可以回复我~
  • 提问者 琑儿 #1
    这部分代码和老师你课上演示的是一模一样的,你的源代码也是这样的没有居中的呢
    回复 有任何疑惑可以回复我~ 2019-08-19 11:15:27
  • Dell 回复 提问者 琑儿 #2
    我的图可能和现在的图尺寸大小不一样
    回复 有任何疑惑可以回复我~ 2019-08-19 20:38:59
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号