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

网页抽象成三部分(HTML、CSS和JavaScript)后的优点有哪些? #168

Open
pwstrick opened this issue Jul 16, 2019 · 4 comments
Labels
HTML HTML类的题目

Comments

@pwstrick
Copy link
Owner

网页抽象成三部分(HTML、CSS和JavaScript)后的优点有哪些?

@pwstrick pwstrick added the HTML HTML类的题目 label Jul 16, 2019
@naokimidori
Copy link

HTML负责页面内容和结构 CSS负责样式表现 JS负责页面动态交互
抽象成三部分优点:1.增加代码可读性 2.按需加载资源 3.便于后期维护

@darknoll
Copy link

结构、表现、行为

@StevenGrow
Copy link

StevenGrow commented Sep 15, 2023

有利于模块化,CSS 和 JS 可以作为单独的文件,引入到 HTML 文件中。

@Huangaric
Copy link

HTML为结构、CSS为表现、Javascript为行为。网页抽象成三部分(HTML、CSS和JavaScript)后的优点如下:
1.代码结构清晰,可读性强;
2.抽象为3部分,提高代码维护性和复用性;
3.Javascript放置在页面底部或使用defer/async属性加载,可以提高页面加载性能。其次,将CSS样式放在头部可以提高页面渲染速度

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTML HTML类的题目
Projects
None yet
Development

No branches or pull requests

5 participants