前军教程网

中小站长与DIV+CSS网页布局开发技术人员的首选CSS学习平台

话说前端5-css的引入

分享兴趣,传播快乐,增长见闻,留下美好!亲爱的您,这里是Learning yard新学苑。今天小编为大家带来话说前端(5)|css的引入。

Share interest, spread happiness, increase knowledge, and leave behind beauty! Dear you, this is Learning yard New Academy. Today, Xiaobian brings you the introduction of front-end (5)|css.

前面咱们学过html,那现在就开始学习css,css是用来美化html的样式,可以是我们的页面更加美观,现在讲一讲css的引入方法。

We have learned html before, so let's start learning css now. css is a style used to beautify html, which can make our pages more beautiful. Now let's talk about the introduction method of css.

首先,css的引入有两种方式,一种是在标签内部写入样式,例如<font color=”red”></font>,这里的color=“red”就是css样式,引用方式是内联式的。但是这种方法的耦合程度太高,不利于我们后续的增删改和维护,所以不太容易采用。

First of all, there are two ways to introduce css. One way is to write styles inside the tags, such as < font color = "red" > </font >. Here, color = "red" is css style, and the quotation method is inline. However, the coupling degree of this method is too high, which is not conducive to our subsequent addition, deletion and maintenance, so it is not easy to adopt.

第二种就是外联式,大家知道,写代码的时候要写三部分<html><head></head><body></body></html>,外联式的css就写在< head ></ head >中间,要在其中写<style></style>然后就可以写css的样式,然后直接写标签的名字即可,例如<style>li{color:red;}</style>,就可以使li的字体变成红色,其他的选择器我们下次再学。

The second one is outreach. As we all know, when writing code, you have to write three parts < html > < head ></ head > < body > </html >. Outreach css is written in the middle of < head > </head >. You should write < style></style > in it, then you can write the style of css, and then write the label directly. }</style >, you can turn li's font into red, and we'll learn other selectors next time.

今天的分享就到这里了。如果您对今天的文章有什么独特的想法,欢迎评论留言,让我们相约明天,祝您今天过得开心快乐!

That's all for today's sharing. If you have any unique ideas about today's article, please comment and leave a message. Let's make an appointment tomorrow and wish you a happy day!

发表评论:

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言