Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seller组件商家实景图宽度计算修改 #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

theydy
Copy link

@theydy theydy commented Apr 30, 2018

在老师课程的提问区看到有同学说这里不需要计算ul宽度,直接触发BFC就行,然后自己试了下,发现这里确实可以省略ul的宽度计算,但应该不是BFC的原因。
因为ul默认是块标签,所以宽度是由父元素决定的,不会被内容撑开,这里只要把ul的display设置成inline-block 或者设置浮动,就能让ul自适应内容宽度了。

展示图片的ul标签修改为display: inline-block, 由内容撑开宽度,代替原有的手动计算宽度。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant