内联样式与类 [英] Inline Styles vs Classes

查看:94
本文介绍了内联样式与类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我脑海中,我总是知道对任何项目使用内联样式的类。但是有没有定义每个的利弊的文章/帖子/博客?我正在对此进行辩论,我似乎找不到很久以前阅读过的这篇博文。

In my head, I've always known to use classes over inline styles for any project. But are there any articles/postings/blogs defining the pros/cons of each? I'm in a debate about this, and I cant seem to find the blog post I read a long time ago about this.

推荐答案

p>有一个简单的原因。 CSS的要点是将内容(HTML)与演示文稿(CSS)分离。这是关于辅助功能和 notoxlow noreferrer>代码重用

There is a simple reason. The point of CSS is to separate the content (HTML) from the presentation (CSS). It's all about accessibility and code reuse.

这篇关于内联样式与类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆