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

[注解] [502] 插入换行 #60

Open
cssmagic opened this issue Feb 8, 2017 · 0 comments
Open

[注解] [502] 插入换行 #60

cssmagic opened this issue Feb 8, 2017 · 0 comments
Labels

Comments

@cssmagic
Copy link
Owner

cssmagic commented Feb 8, 2017

花絮与注解

第 117 页 ‧ 图 5-6

图 5-6

这张图故意画得比较宽,表示还有很多的水平空间可以放置内容。

交流与答疑

知乎网友提问:

https://www.zhihu.com/question/46744302

<dl> 做包裹加了很多 CSS 样式到底有没有必要?用 <li> 加上 <span> 的方式一样可以很好的实现。有必要写这么复杂吗?这样写的原因在哪里?半新人求大神帮忙解析一下。

我写了一段 “政治不正确” 的回答,想了想没有在知乎发出来。就放在这里吧。

这个结构看起来似乎是为了强调语义化,但实际上还是为这一节的 CSS 技巧作铺垫。作为读者,吸收这其中的 CSS 知识就好了。读书要抓重点,不要在意这些细节。

话说回来,这段内容用 <dl> 来标记真的合适吗?我倒感觉像是滥用定义列表啊。似乎这里用 hCard 微格式来标记明显更加清晰,更易于被机器理解。所以 “语义化” 这回事,见仁见智,无需迷信权威。

@cssmagic cssmagic mentioned this issue Feb 8, 2017
@cssmagic cssmagic added the 注解 label Mar 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant