如何保持 html 语义正确并处理大型门户网站或新闻网站等复杂设计的大型 CSS?
在个人和小型企业网站中,这并不困难,但当我们涉及新网站、门户网站和电子商务网站时,每个页面上都有如此多的内容,这就不难了。
如何保持 **HTML 语义正确并处理大型 CSS 复杂设计(例如大型门户网站或新闻网站)?**
如何保持 HTML 代码语义正确css 类和 ID 的命名约定是否正确且符合语义?
在这种情况下使用 CSS 网格框架是处理 CSS 的最佳方法吗?
In personal and small business websites it's not so difficult but when we comes to New sites,Portals and E-commerce sites, where so many content comes on each pages, it's little hard.
How do you keep **HTML semantically correct and and handle big CSS of complex designs like Big portals or News sites?**
How to keep the HTML code semantically correct and Semantic naming convention for css classes and ID?
Is to use CSS grid Framework the best way to handle CSS in this scenario?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
虽然一般来说你会想要避免“div soup”,但 div 和 span 没有任何意义,并且如果它们有帮助的话,你没有理由不能在“语义上正确”的 HTML 中自由地使用它们。你组织。
While in general you'll want to avoid "div soup", div and span have no meaning, and there's no reason you can't use them liberally in addition to "semantically correct" HTML if they help you organize.
这里最好的做法是创建它们,然后将它们向右或向左浮动。指定它们的宽度。因此,当您尝试在不同的浏览器中打开它们时,它们将正确对齐,或者如果您尝试以非常低或高分辨率访问它们,它们仍然完美对齐。基本上,您需要创建一个嵌套结构,以便所有相应的元素分别对齐。
The best thing to do here is to create and then float them right or left . Specify their width . Hence when you try to open them in different browsers they will be aligned properly or if you try to access them in very low or high resolution still they are perfectly aligned . Basically you need to create a nested structure so that all your corresponding elements are aligned respectively .
为了扩展和灵活性,我建议使用 Twitter bootstrap,它的脚手架功能将为您的新闻网站提供 4 种响应式变体这非常适合手机、iPad 等。可能需要一段时间来学习和实施,但当您看到最终结果时,您会很高兴自己做到了;)
For scaling and flexibility I would recommend using Twitter bootstrap, its scaffolding feature will give your news site 4 responsive variations which is excellent for phone iPad etc. May take a while to learn and implement but you'll be glad you did it when you see the final results ;)